Class: JaxrsDoc::Annotation
- Inherits:
-
Object
- Object
- JaxrsDoc::Annotation
- Defined in:
- lib/annotations.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(annotation_text) ⇒ Annotation
constructor
A new instance of Annotation.
- #to_s ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(annotation_text) ⇒ Annotation
Returns a new instance of Annotation.
80 81 82 83 84 85 |
# File 'lib/annotations.rb', line 80 def initialize(annotation_text) @values = [] @text = annotation_text.strip @name = @text.delete("@").split("(")[0] parse_values end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
78 79 80 |
# File 'lib/annotations.rb', line 78 def name @name end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
78 79 80 |
# File 'lib/annotations.rb', line 78 def values @values end |
Instance Method Details
#to_s ⇒ Object
91 92 93 |
# File 'lib/annotations.rb', line 91 def to_s @text end |
#value ⇒ Object
87 88 89 |
# File 'lib/annotations.rb', line 87 def value @values[0] end |