Class: Height::Parsers::Base
- Inherits:
-
Object
- Object
- Height::Parsers::Base
- Defined in:
- lib/height/parsers/base.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(input) ⇒ Base
constructor
A new instance of Base.
- #parsed? ⇒ Boolean
Constructor Details
#initialize(input) ⇒ Base
Returns a new instance of Base.
6 7 8 9 |
# File 'lib/height/parsers/base.rb', line 6 def initialize(input) @input = input @value = self.class.parse(input) end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
4 5 6 |
# File 'lib/height/parsers/base.rb', line 4 def input @input end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/height/parsers/base.rb', line 4 def value @value end |
Instance Method Details
#parsed? ⇒ Boolean
11 12 13 |
# File 'lib/height/parsers/base.rb', line 11 def parsed? @value end |