Class: Appwrite::Models::Block
- Inherits:
-
Object
- Object
- Appwrite::Models::Block
- Defined in:
- lib/appwrite/models/block.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#expired_at ⇒ Object
readonly
Returns the value of attribute expired_at.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#resource_id ⇒ Object
readonly
Returns the value of attribute resource_id.
-
#resource_type ⇒ Object
readonly
Returns the value of attribute resource_type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, resource_type:, resource_id:, reason:, expired_at:) ⇒ Block
constructor
A new instance of Block.
- #to_map ⇒ Object
Constructor Details
#initialize(created_at:, resource_type:, resource_id:, reason:, expired_at:) ⇒ Block
Returns a new instance of Block.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/appwrite/models/block.rb', line 12 def initialize( created_at:, resource_type:, resource_id:, reason: , expired_at: ) @created_at = created_at @resource_type = resource_type @resource_id = resource_id @reason = reason @expired_at = expired_at end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/appwrite/models/block.rb', line 6 def created_at @created_at end |
#expired_at ⇒ Object (readonly)
Returns the value of attribute expired_at.
10 11 12 |
# File 'lib/appwrite/models/block.rb', line 10 def expired_at @expired_at end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
9 10 11 |
# File 'lib/appwrite/models/block.rb', line 9 def reason @reason end |
#resource_id ⇒ Object (readonly)
Returns the value of attribute resource_id.
8 9 10 |
# File 'lib/appwrite/models/block.rb', line 8 def resource_id @resource_id end |
#resource_type ⇒ Object (readonly)
Returns the value of attribute resource_type.
7 8 9 |
# File 'lib/appwrite/models/block.rb', line 7 def resource_type @resource_type end |
Class Method Details
Instance Method Details
#to_map ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/appwrite/models/block.rb', line 36 def to_map { "$createdAt": @created_at, "resourceType": @resource_type, "resourceId": @resource_id, "reason": @reason, "expiredAt": @expired_at } end |