Class: JaxrsDoc::Annotation

Inherits:
Object
  • Object
show all
Defined in:
lib/annotations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(annotation_text) ⇒ Annotation

Returns a new instance of Annotation.



79
80
81
82
83
# File 'lib/annotations.rb', line 79

def initialize(annotation_text)
  @text = annotation_text.strip
  @name = @text.delete("@").split("(")[0]
  parse_values
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



77
78
79
# File 'lib/annotations.rb', line 77

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



77
78
79
# File 'lib/annotations.rb', line 77

def value
  @value
end

#valuesObject (readonly)

Returns the value of attribute values.



77
78
79
# File 'lib/annotations.rb', line 77

def values
  @values
end

Instance Method Details

#to_sObject



85
86
87
# File 'lib/annotations.rb', line 85

def to_s
  @text
end