Method: RDoc::Context#find_attribute_named
- Defined in:
- lib/rdoc/code_object/context.rb
#find_attribute_named(name) ⇒ Object
Finds an attribute with name
in this context
795 796 797 798 799 800 801 802 803 804 |
# File 'lib/rdoc/code_object/context.rb', line 795 def find_attribute_named(name) case name when /\A#/ then find_attribute name[1..-1], false when /\A::/ then find_attribute name[2..-1], true else @attributes.find { |a| a.name == name } end end |