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.



8
9
10
11
12
# File 'lib/appwrite/models/preferences.rb', line 8

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



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

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

Instance Method Details

#convert_to(from_json) ⇒ Object



26
27
28
# File 'lib/appwrite/models/preferences.rb', line 26

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

#to_mapObject



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

def to_map
    {
        "data": @data
    }
end