Class: BEL::Language::AnnotationDefinition
- Inherits:
-
Struct
- Object
- Struct
- BEL::Language::AnnotationDefinition
- Defined in:
- lib/bel/language.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
- #to_bel ⇒ Object (also: #to_s)
Instance Attribute Details
#prefix ⇒ Object
Returns the value of attribute prefix
40 41 42 |
# File 'lib/bel/language.rb', line 40 def prefix @prefix end |
#type ⇒ Object
Returns the value of attribute type
40 41 42 |
# File 'lib/bel/language.rb', line 40 def type @type end |
#value ⇒ Object
Returns the value of attribute value
40 41 42 |
# File 'lib/bel/language.rb', line 40 def value @value end |
Instance Method Details
#to_bel ⇒ Object Also known as: to_s
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/bel/language.rb', line 41 def to_bel 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 :uri, :url %Q{DEFINE ANNOTATION #{self.prefix} AS URL "#{self.value}"} end end |