Class: Appwrite::Models::Preferences

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/preferences.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:) ⇒ Preferences

Returns a new instance of Preferences.



7
8
9
# File 'lib/appwrite/models/preferences.rb', line 7

def initialize(
data:            )
@data = data            end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/appwrite/models/preferences.rb', line 6

def data
  @data
end

Class Method Details

.from(map:) ⇒ Object



11
12
13
14
# File 'lib/appwrite/models/preferences.rb', line 11

def self.from(map:)
    Preferences.new(
        data: map                )
end

Instance Method Details

#convert_to(from_json) ⇒ Object



21
22
23
# File 'lib/appwrite/models/preferences.rb', line 21

def convert_to(from_json)
    from_json.call(data)
end

#to_mapObject



16
17
18
19
# File 'lib/appwrite/models/preferences.rb', line 16

def to_map
    {
        "data": @data                }
end