Class: Ayadn::PreferencesFormats
- Defined in:
- lib/ayadn/preferences_object.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
Returns the value of attribute list.
-
#table ⇒ Object
Returns the value of attribute table.
Instance Method Summary collapse
-
#initialize(hash) ⇒ PreferencesFormats
constructor
A new instance of PreferencesFormats.
- #to_h ⇒ Object
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
#list ⇒ Object
Returns the value of attribute list.
29 30 31 |
# File 'lib/ayadn/preferences_object.rb', line 29 def list @list end |
#table ⇒ Object
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_h ⇒ Object
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 |