Class: Shaf::Yard::AttributeObject
- Inherits:
-
YARD::CodeObjects::Base
- Object
- YARD::CodeObjects::Base
- Shaf::Yard::AttributeObject
- Defined in:
- lib/shaf/yard/attribute_object.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #descriptor ⇒ Object
- #documentation ⇒ Object
- #profile ⇒ Object
- #profile_doc ⇒ Object
- #value_types ⇒ Object
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/shaf/yard/attribute_object.rb', line 6 def name @name end |
Instance Method Details
#descriptor ⇒ Object
25 26 27 |
# File 'lib/shaf/yard/attribute_object.rb', line 25 def descriptor profile&.find_attribute(name) end |
#documentation ⇒ Object
8 9 10 |
# File 'lib/shaf/yard/attribute_object.rb', line 8 def documentation profile_doc || 'Not documented' end |
#profile ⇒ Object
12 13 14 15 |
# File 'lib/shaf/yard/attribute_object.rb', line 12 def profile return unless namespace.respond_to? :profile @profile ||= namespace.profile end |
#profile_doc ⇒ Object
21 22 23 |
# File 'lib/shaf/yard/attribute_object.rb', line 21 def profile_doc descriptor&.doc end |
#value_types ⇒ Object
17 18 19 |
# File 'lib/shaf/yard/attribute_object.rb', line 17 def value_types Array(descriptor&.type).compact.map(&:to_s) end |