Class: Appwrite::Models::Preferences
- Inherits:
-
Object
- Object
- Appwrite::Models::Preferences
- Defined in:
- lib/appwrite/models/preferences.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
- #convert_to(from_json) ⇒ Object
-
#initialize(data:) ⇒ Preferences
constructor
A new instance of Preferences.
- #to_map ⇒ Object
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
#data ⇒ Object (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_map ⇒ Object
16 17 18 19 |
# File 'lib/appwrite/models/preferences.rb', line 16 def to_map { "data": @data } end |