Class: Ayadn::PreferencesFormats

Inherits:
Object
  • Object
show all
Defined in:
lib/ayadn/preferences_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ PreferencesFormats

Returns a new instance of PreferencesFormats.



30
31
32
33
# File 'lib/ayadn/preferences_object.rb', line 30

def initialize hash
  @table = PreferencesFormatsTable.new(hash[:table])
  @list = PreferencesFormatsList.new(hash[:list])
end

Instance Attribute Details

#listObject

Returns the value of attribute list.



29
30
31
# File 'lib/ayadn/preferences_object.rb', line 29

def list
  @list
end

#tableObject

Returns the value of attribute table.



29
30
31
# File 'lib/ayadn/preferences_object.rb', line 29

def table
  @table
end

Instance Method Details

#to_hObject



34
35
36
37
38
39
# File 'lib/ayadn/preferences_object.rb', line 34

def to_h
  {
    table: @table.to_h,
    list: @list.to_h
  }
end