B
Brian Schröder
Hello Group,
what do you think? I think it would make sense to include the file in
which a function is defined into the ri output. On my debian system with
a mostly plain vanilla ruby installation ri yields for example:
$ ri Array#abbrev
----------------------------------------------------------- Array#abbrev
abbrev(pattern = nil)
------------------------------------------------------------------------
Calculates the set of unambiguous abbreviations for the strings in
self. If passed a pattern or a string, only the strings matching
the pattern or starting with the string are considered.
%w{ car cone }.abbrev #=> { "ca" => "car", "car" => "car",
"co" => "cone", "con" => cone",
"cone" => "cone" }
$ irb
irb(main):001:0> %w{car cone}.abbrev
NoMethodError: undefined method `abbrev' for ["car", "cone"]:Array
from (irb):1
So I deduce that abbrev is declared in some library. But where it is can
only be found by using grep in the library directory. It would be nice
to have something like:
defined in: namespace/xyz.rb
included in the ri output.
Regards,
Brian Schröder
what do you think? I think it would make sense to include the file in
which a function is defined into the ri output. On my debian system with
a mostly plain vanilla ruby installation ri yields for example:
$ ri Array#abbrev
----------------------------------------------------------- Array#abbrev
abbrev(pattern = nil)
------------------------------------------------------------------------
Calculates the set of unambiguous abbreviations for the strings in
self. If passed a pattern or a string, only the strings matching
the pattern or starting with the string are considered.
%w{ car cone }.abbrev #=> { "ca" => "car", "car" => "car",
"co" => "cone", "con" => cone",
"cone" => "cone" }
$ irb
irb(main):001:0> %w{car cone}.abbrev
NoMethodError: undefined method `abbrev' for ["car", "cone"]:Array
from (irb):1
So I deduce that abbrev is declared in some library. But where it is can
only be found by using grep in the library directory. It would be nice
to have something like:
defined in: namespace/xyz.rb
included in the ri output.
Regards,
Brian Schröder