Class: Mork::Raw::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/mork/raw/group.rb

Overview

A group of updates to the data

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#valuesObject (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

#dictionariesObject



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