Class: Rafflesia::RuntimeStatus
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::RuntimeStatus
- Defined in:
- lib/rafflesia/system/runtime_status.rb
Constant Summary collapse
- HASH_ATTRS =
{ available_bytes: :available_bytes, checked_at: :checked_at, free_bytes: :free_bytes, is_present: :is_present, is_repairable: :is_repairable, kind: :kind, message: :message, min_free_bytes: :min_free_bytes, name: :name, path: :path, recovery_hint: :recovery_hint, status: :status, total_bytes: :total_bytes, used_percent: :used_percent }.freeze
Instance Attribute Summary collapse
-
#available_bytes ⇒ Object
Returns the value of attribute available_bytes.
-
#checked_at ⇒ Object
Returns the value of attribute checked_at.
-
#free_bytes ⇒ Object
Returns the value of attribute free_bytes.
-
#is_present ⇒ Object
Returns the value of attribute is_present.
-
#is_repairable ⇒ Object
Returns the value of attribute is_repairable.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#message ⇒ Object
Returns the value of attribute message.
-
#min_free_bytes ⇒ Object
Returns the value of attribute min_free_bytes.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#recovery_hint ⇒ Object
Returns the value of attribute recovery_hint.
-
#status ⇒ Object
Returns the value of attribute status.
-
#total_bytes ⇒ Object
Returns the value of attribute total_bytes.
-
#used_percent ⇒ Object
Returns the value of attribute used_percent.
Instance Method Summary collapse
-
#initialize(json) ⇒ RuntimeStatus
constructor
A new instance of RuntimeStatus.
Constructor Details
#initialize(json) ⇒ RuntimeStatus
Returns a new instance of RuntimeStatus.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/system/runtime_status.rb', line 41 def initialize(json) super() hash = self.class.normalize(json) @available_bytes = hash[:available_bytes] @checked_at = hash[:checked_at] @free_bytes = hash[:free_bytes] @is_present = hash[:is_present] @is_repairable = hash[:is_repairable] @kind = hash[:kind] @message = hash[:message] @min_free_bytes = hash[:min_free_bytes] @name = hash[:name] @path = hash[:path] @recovery_hint = hash[:recovery_hint] @status = hash[:status] @total_bytes = hash[:total_bytes] @used_percent = hash[:used_percent] end |
Instance Attribute Details
#available_bytes ⇒ Object
Returns the value of attribute available_bytes.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def available_bytes @available_bytes end |
#checked_at ⇒ Object
Returns the value of attribute checked_at.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def checked_at @checked_at end |
#free_bytes ⇒ Object
Returns the value of attribute free_bytes.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def free_bytes @free_bytes end |
#is_present ⇒ Object
Returns the value of attribute is_present.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def is_present @is_present end |
#is_repairable ⇒ Object
Returns the value of attribute is_repairable.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def is_repairable @is_repairable end |
#kind ⇒ Object
Returns the value of attribute kind.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def kind @kind end |
#message ⇒ Object
Returns the value of attribute message.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def @message end |
#min_free_bytes ⇒ Object
Returns the value of attribute min_free_bytes.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def min_free_bytes @min_free_bytes end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def path @path end |
#recovery_hint ⇒ Object
Returns the value of attribute recovery_hint.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def recovery_hint @recovery_hint end |
#status ⇒ Object
Returns the value of attribute status.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def status @status end |
#total_bytes ⇒ Object
Returns the value of attribute total_bytes.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def total_bytes @total_bytes end |
#used_percent ⇒ Object
Returns the value of attribute used_percent.
25 26 27 |
# File 'lib/rafflesia/system/runtime_status.rb', line 25 def used_percent @used_percent end |