Class: Seam::Resources::Device::Properties::Battery
- Inherits:
-
BaseResource
- Object
- BaseResource
- Seam::Resources::Device::Properties::Battery
- Defined in:
- lib/seam/resources/device.rb
Instance Attribute Summary collapse
-
#level ⇒ Float
Battery charge level as a value between 0 and 1, inclusive.
-
#status ⇒ String
Represents the current status of the battery charge level.
Attributes inherited from BaseResource
Method Summary
Methods inherited from BaseResource
#[], date_accessor, #initialize, #inspect, load_from_response, resource_accessor, resource_accessors, resource_list_accessor, resource_list_accessors, #update_from_response
Constructor Details
This class inherits a constructor from Seam::Resources::BaseResource
Instance Attribute Details
#level ⇒ Float
Battery charge level as a value between 0 and 1, inclusive.
93 94 95 |
# File 'lib/seam/resources/device.rb', line 93 def level @level end |
#status ⇒ String
Represents the current status of the battery charge level. Values are critical, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; low, which signifies that the battery is under the preferred threshold and should be charged soon; good, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and full, which represents a battery that is fully charged, providing the maximum duration of usage.
96 97 98 |
# File 'lib/seam/resources/device.rb', line 96 def status @status end |