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