Class: BEL::Script::AnnotationDefinition
- Inherits:
-
Struct
- Object
- Struct
- BEL::Script::AnnotationDefinition
- Defined in:
- lib/bel/parse_objects.rb
Instance Attribute Summary collapse
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#prefix ⇒ Object
Returns the value of attribute prefix
25 26 27 |
# File 'lib/bel/parse_objects.rb', line 25 def prefix @prefix end |
#type ⇒ Object
Returns the value of attribute type
25 26 27 |
# File 'lib/bel/parse_objects.rb', line 25 def type @type end |
#value ⇒ Object
Returns the value of attribute value
25 26 27 |
# File 'lib/bel/parse_objects.rb', line 25 def value @value end |
Instance Method Details
#to_s ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/bel/parse_objects.rb', line 26 def to_s case self.type when :list %Q{DEFINE ANNOTATION #{self.prefix} AS LIST {#{self.value.join(',')}}} when :pattern %Q{DEFINE ANNOTATION #{self.prefix} AS PATTERN "#{self.value}"} when :url %Q{DEFINE ANNOTATION #{self.prefix} AS URL "#{self.value}"} end end |