Class: Ayadn::PreferencesBackup
- Defined in:
- lib/ayadn/preferences_object.rb
Instance Attribute Summary collapse
-
#lists ⇒ Object
Returns the value of attribute lists.
-
#messages ⇒ Object
Returns the value of attribute messages.
-
#posts ⇒ Object
Returns the value of attribute posts.
Instance Method Summary collapse
-
#initialize(hash) ⇒ PreferencesBackup
constructor
A new instance of PreferencesBackup.
- #to_h ⇒ Object
Constructor Details
#initialize(hash) ⇒ PreferencesBackup
Returns a new instance of PreferencesBackup.
168 169 170 171 172 |
# File 'lib/ayadn/preferences_object.rb', line 168 def initialize hash @posts = hash[:posts] @messages = hash[:messages] @lists = hash[:lists] end |
Instance Attribute Details
#lists ⇒ Object
Returns the value of attribute lists.
167 168 169 |
# File 'lib/ayadn/preferences_object.rb', line 167 def lists @lists end |
#messages ⇒ Object
Returns the value of attribute messages.
167 168 169 |
# File 'lib/ayadn/preferences_object.rb', line 167 def @messages end |
#posts ⇒ Object
Returns the value of attribute posts.
167 168 169 |
# File 'lib/ayadn/preferences_object.rb', line 167 def posts @posts end |
Instance Method Details
#to_h ⇒ Object
173 174 175 176 177 178 179 |
# File 'lib/ayadn/preferences_object.rb', line 173 def to_h { posts: @posts, messages: @messages, lists: @lists } end |