Class: Appwrite::Models::Preferences
- Inherits:
-
Object
- Object
- Appwrite::Models::Preferences
- Defined in:
- lib/appwrite/models/preferences.rb
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 10 11 |
# File 'lib/appwrite/models/preferences.rb', line 7 def initialize( data: ) @data = data end |
Class Method Details
.from(map:) ⇒ Object
13 14 15 16 17 |
# File 'lib/appwrite/models/preferences.rb', line 13 def self.from(map:) Preferences.new( data: map["data"] ) end |
Instance Method Details
#convert_to(from_json) ⇒ Object
25 26 27 |
# File 'lib/appwrite/models/preferences.rb', line 25 def convert_to(from_json) from_json.call(data) end |
#to_map ⇒ Object
19 20 21 22 23 |
# File 'lib/appwrite/models/preferences.rb', line 19 def to_map { "data": @data } end |