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.
8 9 10 11 12 |
# File 'lib/appwrite/models/preferences.rb', line 8 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
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_map ⇒ Object
20 21 22 23 24 |
# File 'lib/appwrite/models/preferences.rb', line 20 def to_map { "data": @data } end |