What is “p” in Ruby?

后端 未结 6 1625
栀梦
栀梦 2020-12-09 14:31

I\'m sure it\'s a silly question to those who know, but I can\'t find an explanation of what it does or what it is.

CSV.open(\'data.csv\', \'r\') do |row|
           


        
6条回答
  •  悲&欢浪女
    2020-12-09 15:21

    The other option for documentation that you already have on your system is the ri command. At any time you can type: ri p or if p is defined in a lot of places (which it is) for central commands you can try ri Kernel.p. Other good bets are Array. or String..

    If you end up installing a bunch of gems this will slow down a lot but you can look up the fastri gem which speeds up the lookup process incredibly.

提交回复
热议问题