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.



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

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#valuesObject (readonly)

Returns the value of attribute values.



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

def values
  @values
end

Instance Method Details

#to_sObject



91
92
93
# File 'lib/annotations.rb', line 91

def to_s
  @text
end

#valueObject



87
88
89
# File 'lib/annotations.rb', line 87

def value
  @values[0]
end