Class: YARDJS::CodeObjects::PropertyObject
- Inherits:
-
Base
- Object
- Base
- YARDJS::CodeObjects::PropertyObject
- Defined in:
- lib/yard-js/code_objects/property_object.rb
Instance Attribute Summary collapse
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#property_type ⇒ Object
Returns the value of attribute property_type.
Instance Method Summary collapse
- #aliases ⇒ Object
- #attr_info ⇒ Object
-
#constructor? ⇒ Boolean
Whether or not the method is the #initialize constructor method.
-
#is_alias? ⇒ Boolean
Tests if the object is defined as an alias of another method.
-
#is_attribute? ⇒ Boolean
Tests if the object is defined as an attribute in the namespace.
-
#is_explicit? ⇒ Boolean
Tests boolean #explicit value.
-
#module_function? ⇒ Boolean
Whether or not this method was created as a module function.
- #overridden_method ⇒ MethodObject?
-
#reader? ⇒ Boolean
Whether the method is a reader attribute.
- #relative_path(other) ⇒ Object
- #scope ⇒ Object
- #value ⇒ Object
-
#writer? ⇒ Boolean
Whether the method is a writer attribute.
Instance Attribute Details
#parameters ⇒ Object
Returns the value of attribute parameters.
4 5 6 |
# File 'lib/yard-js/code_objects/property_object.rb', line 4 def parameters @parameters end |
#property_type ⇒ Object
Returns the value of attribute property_type.
4 5 6 |
# File 'lib/yard-js/code_objects/property_object.rb', line 4 def property_type @property_type end |
Instance Method Details
#aliases ⇒ Object
6 |
# File 'lib/yard-js/code_objects/property_object.rb', line 6 def aliases; [] end |
#attr_info ⇒ Object
31 |
# File 'lib/yard-js/code_objects/property_object.rb', line 31 def attr_info; nil end |
#constructor? ⇒ Boolean
Returns whether or not the method is the #initialize constructor method.
9 10 11 |
# File 'lib/yard-js/code_objects/property_object.rb', line 9 def constructor? name == :constructor && namespace.is_a?(YARD::CodeObjects::ClassObject) end |
#is_alias? ⇒ Boolean
Tests if the object is defined as an alias of another method
60 61 62 |
# File 'lib/yard-js/code_objects/property_object.rb', line 60 def is_alias? false end |
#is_attribute? ⇒ Boolean
Tests if the object is defined as an attribute in the namespace
54 55 56 |
# File 'lib/yard-js/code_objects/property_object.rb', line 54 def is_attribute? false end |
#is_explicit? ⇒ Boolean
Tests boolean #explicit value.
67 68 69 |
# File 'lib/yard-js/code_objects/property_object.rb', line 67 def is_explicit? true end |
#module_function? ⇒ Boolean
Returns whether or not this method was created as a module function.
36 37 38 |
# File 'lib/yard-js/code_objects/property_object.rb', line 36 def module_function? false end |
#overridden_method ⇒ MethodObject?
74 75 76 |
# File 'lib/yard-js/code_objects/property_object.rb', line 74 def overridden_method nil end |
#reader? ⇒ Boolean
Returns whether the method is a reader attribute.
48 49 50 |
# File 'lib/yard-js/code_objects/property_object.rb', line 48 def reader? true end |
#relative_path(other) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/yard-js/code_objects/property_object.rb', line 13 def relative_path(other) case other when PropertyObject if other.parent == parent other.name.to_s else other.path end else if parent == other other.name.to_s else other.path end end end |
#scope ⇒ Object
30 |
# File 'lib/yard-js/code_objects/property_object.rb', line 30 def scope; :class end |
#value ⇒ Object
78 79 80 |
# File 'lib/yard-js/code_objects/property_object.rb', line 78 def value tag(:value) ? tag(:value).text : '' end |
#writer? ⇒ Boolean
Returns whether the method is a writer attribute.
42 43 44 |
# File 'lib/yard-js/code_objects/property_object.rb', line 42 def writer? true end |