Class: Mork::Raw::Group
- Inherits:
-
Object
- Object
- Mork::Raw::Group
- Defined in:
- lib/mork/raw/group.rb
Overview
A group of updates to the data
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
- #dictionaries ⇒ Object
-
#initialize(values:) ⇒ Group
constructor
A new instance of Group.
- #resolve(dictionaries:) ⇒ Object
Constructor Details
#initialize(values:) ⇒ Group
Returns a new instance of Group.
13 14 15 |
# File 'lib/mork/raw/group.rb', line 13 def initialize(values:) @values = values end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
11 12 13 |
# File 'lib/mork/raw/group.rb', line 11 def values @values end |
Instance Method Details
#dictionaries ⇒ Object
17 18 19 |
# File 'lib/mork/raw/group.rb', line 17 def dictionaries @dictionaries ||= values.filter { |r| r.is_a?(Raw::Dictionary) } end |
#resolve(dictionaries:) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/mork/raw/group.rb', line 21 def resolve(dictionaries:) { rows: resolved_rows(dictionaries), tables: resolved_tables(dictionaries) } end |