title: In ruby, is there a way to know in the console what a method does?
body: <p>In Ruby, if i am looking for the methods of a class.
  ie:<code>String.methods.sort</code>
  and i have the following:</p>
  
  <pre><code>[:!, :!=, :!~, :&lt;, :&lt;=, :&lt;=&gt;, :==, :===, :=~, :&gt;, :&gt;=, :__id__,
  :__send__, :allocate, :ancestors, :autoload, :autoload?, :class,
  :class_eval, :class_exec, :class_variable_defined?,
  :class_variable_get, :class_variable_set, :class_variables, :clone,
  :const_defined?, :const_get, :const_missing, :const_set, :constants,
  :define_singleton_method, :deprecate_constant, :display, :dup,
  :enum_for, :eql?, :equal?, :extend, :freeze, :frozen?, :hash, 
  :include, :include?, :included_modules, :inspect, :instance_eval,...]
  </code></pre>
  
  <p>Is there a way for me to type a command in the console to explore a method? If i am unfamiliar with <code>:display</code> and i want to know what it does, what it returns, is it possible?</p>
  
  <p>If yes, does PHP and javascript have something similar to see method definition in console? It does not look like I have encountered it.</p>