Class: Appwrite::Models::LocaleCode
- Inherits:
-
Object
- Object
- Appwrite::Models::LocaleCode
- Defined in:
- lib/appwrite/models/locale_code.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code:, name:) ⇒ LocaleCode
constructor
A new instance of LocaleCode.
- #to_map ⇒ Object
Constructor Details
#initialize(code:, name:) ⇒ LocaleCode
Returns a new instance of LocaleCode.
9 10 11 12 13 14 15 |
# File 'lib/appwrite/models/locale_code.rb', line 9 def initialize( code:, name: ) @code = code @name = name end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/appwrite/models/locale_code.rb', line 6 def code @code end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/appwrite/models/locale_code.rb', line 7 def name @name end |
Class Method Details
.from(map:) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/appwrite/models/locale_code.rb', line 17 def self.from(map:) LocaleCode.new( code: map["code"], name: map["name"] ) end |
Instance Method Details
#to_map ⇒ Object
24 25 26 27 28 29 |
# File 'lib/appwrite/models/locale_code.rb', line 24 def to_map { "code": @code, "name": @name } end |