Class: Mork::Resolved::Row
- Inherits:
-
Object
- Object
- Mork::Resolved::Row
- Defined in:
- lib/mork/resolved/row.rb
Overview
A resolved Row
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#cells ⇒ Object
readonly
Returns the value of attribute cells.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Instance Method Summary collapse
-
#initialize(action:, namespace:, id:, cells:) ⇒ Row
constructor
A new instance of Row.
- #to_h ⇒ Object
Constructor Details
#initialize(action:, namespace:, id:, cells:) ⇒ Row
Returns a new instance of Row.
13 14 15 16 17 18 |
# File 'lib/mork/resolved/row.rb', line 13 def initialize(action:, namespace:, id:, cells:) @action = action @namespace = namespace @id = id @cells = cells end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
8 9 10 |
# File 'lib/mork/resolved/row.rb', line 8 def action @action end |
#cells ⇒ Object (readonly)
Returns the value of attribute cells.
11 12 13 |
# File 'lib/mork/resolved/row.rb', line 11 def cells @cells end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/mork/resolved/row.rb', line 10 def id @id end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
9 10 11 |
# File 'lib/mork/resolved/row.rb', line 9 def namespace @namespace end |
Instance Method Details
#to_h ⇒ Object
20 21 22 23 24 25 |
# File 'lib/mork/resolved/row.rb', line 20 def to_h cells. each.with_object({}) do |cell, acc| acc[cell.key] = cell.value end end |