Class: Appwrite::Models::HealthTime
- Inherits:
-
Object
- Object
- Appwrite::Models::HealthTime
- Defined in:
- lib/appwrite/models/health_time.rb
Instance Attribute Summary collapse
-
#diff ⇒ Object
readonly
Returns the value of attribute diff.
-
#local_time ⇒ Object
readonly
Returns the value of attribute local_time.
-
#remote_time ⇒ Object
readonly
Returns the value of attribute remote_time.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(remote_time:, local_time:, diff:) ⇒ HealthTime
constructor
A new instance of HealthTime.
- #to_map ⇒ Object
Constructor Details
#initialize(remote_time:, local_time:, diff:) ⇒ HealthTime
Returns a new instance of HealthTime.
10 11 12 13 14 15 16 17 18 |
# File 'lib/appwrite/models/health_time.rb', line 10 def initialize( remote_time:, local_time:, diff: ) @remote_time = remote_time @local_time = local_time @diff = diff end |
Instance Attribute Details
#diff ⇒ Object (readonly)
Returns the value of attribute diff.
8 9 10 |
# File 'lib/appwrite/models/health_time.rb', line 8 def diff @diff end |
#local_time ⇒ Object (readonly)
Returns the value of attribute local_time.
7 8 9 |
# File 'lib/appwrite/models/health_time.rb', line 7 def local_time @local_time end |
#remote_time ⇒ Object (readonly)
Returns the value of attribute remote_time.
6 7 8 |
# File 'lib/appwrite/models/health_time.rb', line 6 def remote_time @remote_time end |
Class Method Details
.from(map:) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/appwrite/models/health_time.rb', line 20 def self.from(map:) HealthTime.new( remote_time: map["remoteTime"], local_time: map["localTime"], diff: map["diff"] ) end |
Instance Method Details
#to_map ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/appwrite/models/health_time.rb', line 28 def to_map { "remoteTime": @remote_time, "localTime": @local_time, "diff": @diff } end |