Class: Trumail::Parser::Base
- Inherits:
-
Object
- Object
- Trumail::Parser::Base
- Defined in:
- lib/trumail/parser/base.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(data) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'lib/trumail/parser/base.rb', line 9 def initialize(data) @data = data @hash = {} end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
7 8 9 |
# File 'lib/trumail/parser/base.rb', line 7 def hash @hash end |
Class Method Details
.parse(data) ⇒ Object
14 15 16 17 18 |
# File 'lib/trumail/parser/base.rb', line 14 def self.parse(data) klass = new(data) klass.parse klass.hash end |