Class: Ayadn::PreferencesBackup

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#listsObject

Returns the value of attribute lists.



167
168
169
# File 'lib/ayadn/preferences_object.rb', line 167

def lists
  @lists
end

#messagesObject

Returns the value of attribute messages.



167
168
169
# File 'lib/ayadn/preferences_object.rb', line 167

def messages
  @messages
end

#postsObject

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_hObject



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