Class: Emmental::Row
- Inherits:
-
Object
- Object
- Emmental::Row
- Defined in:
- lib/emmental/row.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(hash, headers) ⇒ Row
constructor
A new instance of Row.
- #to_h ⇒ Object
Constructor Details
#initialize(hash, headers) ⇒ Row
Returns a new instance of Row.
5 6 7 8 9 10 11 12 |
# File 'lib/emmental/row.rb', line 5 def initialize(hash, headers) @hash = hash @headers = headers hash.each_key do |header| @headers.add_header(header) end end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
3 4 5 |
# File 'lib/emmental/row.rb', line 3 def headers @headers end |
Instance Method Details
#to_h ⇒ Object
14 15 16 |
# File 'lib/emmental/row.rb', line 14 def to_h @hash end |