Class: Rafflesia::RuntimeStatus

Inherits:
Types::BaseModel
  • Object
show all
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

Instance Method Summary collapse

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_bytesObject

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_atObject

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_bytesObject

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_presentObject

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_repairableObject

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

#kindObject

Returns the value of attribute kind.



25
26
27
# File 'lib/rafflesia/system/runtime_status.rb', line 25

def kind
  @kind
end

#messageObject

Returns the value of attribute message.



25
26
27
# File 'lib/rafflesia/system/runtime_status.rb', line 25

def message
  @message
end

#min_free_bytesObject

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

#nameObject

Returns the value of attribute name.



25
26
27
# File 'lib/rafflesia/system/runtime_status.rb', line 25

def name
  @name
end

#pathObject

Returns the value of attribute path.



25
26
27
# File 'lib/rafflesia/system/runtime_status.rb', line 25

def path
  @path
end

#recovery_hintObject

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

#statusObject

Returns the value of attribute status.



25
26
27
# File 'lib/rafflesia/system/runtime_status.rb', line 25

def status
  @status
end

#total_bytesObject

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_percentObject

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