Class: CfScript::InstanceStatus
- Inherits:
-
Object
- Object
- CfScript::InstanceStatus
- Defined in:
- lib/cf_script/object/instance_status.rb
Instance Attribute Summary collapse
-
#cpu ⇒ Object
readonly
Returns the value of attribute cpu.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#disk ⇒ Object
readonly
Returns the value of attribute disk.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#memory ⇒ Object
readonly
Returns the value of attribute memory.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ InstanceStatus
constructor
A new instance of InstanceStatus.
- #show(*attrs) ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ InstanceStatus
Returns a new instance of InstanceStatus.
10 11 12 13 14 15 16 17 18 |
# File 'lib/cf_script/object/instance_status.rb', line 10 def initialize(attrs = {}) @index = attrs[:index] ? attrs[:index].value : nil @state = attrs[:state] ? attrs[:state].value : nil @since = attrs[:since] ? attrs[:since].value : nil @cpu = attrs[:cpu] ? attrs[:cpu].value : nil @memory = attrs[:memory] ? attrs[:memory].value : nil @disk = attrs[:disk] ? attrs[:disk].value : nil @details = attrs[:details] ? attrs[:details].value : nil end |
Instance Attribute Details
#cpu ⇒ Object (readonly)
Returns the value of attribute cpu.
5 6 7 |
# File 'lib/cf_script/object/instance_status.rb', line 5 def cpu @cpu end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
8 9 10 |
# File 'lib/cf_script/object/instance_status.rb', line 8 def details @details end |
#disk ⇒ Object (readonly)
Returns the value of attribute disk.
7 8 9 |
# File 'lib/cf_script/object/instance_status.rb', line 7 def disk @disk end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
2 3 4 |
# File 'lib/cf_script/object/instance_status.rb', line 2 def index @index end |
#memory ⇒ Object (readonly)
Returns the value of attribute memory.
6 7 8 |
# File 'lib/cf_script/object/instance_status.rb', line 6 def memory @memory end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
4 5 6 |
# File 'lib/cf_script/object/instance_status.rb', line 4 def since @since end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/cf_script/object/instance_status.rb', line 3 def state @state end |
Instance Method Details
#show(*attrs) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/cf_script/object/instance_status.rb', line 20 def show(*attrs) line = [] attrs.each do |attr| line << "#{attr}: #{send(attr)}" end line.join(', ') end |