Class: OboParser::Tokens::TagValuePair
Instance Attribute Summary collapse
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(str) ⇒ TagValuePair
constructor
A new instance of TagValuePair.
Constructor Details
#initialize(str) ⇒ TagValuePair
Returns a new instance of TagValuePair.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/tokens.rb', line 27 def initialize(str) str.strip! str = str.split(':',2) str[1].strip! # strip trailing comments @tag = str[0] @value = str[1] end |
Instance Attribute Details
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
25 26 27 |
# File 'lib/tokens.rb', line 25 def tag @tag end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
25 26 27 |
# File 'lib/tokens.rb', line 25 def value @value end |