Class: Megam::Mixins::CommonDeployable
- Inherits:
-
Object
- Object
- Megam::Mixins::CommonDeployable
- Includes:
- Nilavu::MegamAttributes
- Defined in:
- lib/megam/mixins/common_deployable.rb
Constant Summary collapse
- ATTRIBUTES =
[ :status, :state, :inputs]
Constants included from Nilavu::MegamAttributes
Nilavu::MegamAttributes::KEY, Nilavu::MegamAttributes::VALUE
Instance Attribute Summary collapse
-
#inputs ⇒ Object
readonly
Returns the value of attribute inputs.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(params) ⇒ CommonDeployable
constructor
A new instance of CommonDeployable.
- #to_hash ⇒ Object
Methods included from Nilavu::MegamAttributes
Constructor Details
#initialize(params) ⇒ CommonDeployable
Returns a new instance of CommonDeployable.
17 18 19 20 21 22 23 |
# File 'lib/megam/mixins/common_deployable.rb', line 17 def initialize(params) @status = 'initialized' @state = 'initialized' set_attributes(params) @inputs = InputGroupData.new(params) end |
Instance Attribute Details
#inputs ⇒ Object (readonly)
Returns the value of attribute inputs.
7 8 9 |
# File 'lib/megam/mixins/common_deployable.rb', line 7 def inputs @inputs end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
7 8 9 |
# File 'lib/megam/mixins/common_deployable.rb', line 7 def state @state end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
7 8 9 |
# File 'lib/megam/mixins/common_deployable.rb', line 7 def status @status end |
Instance Method Details
#attributes ⇒ Object
13 14 15 |
# File 'lib/megam/mixins/common_deployable.rb', line 13 def attributes ATTRIBUTES end |
#to_hash ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/megam/mixins/common_deployable.rb', line 25 def to_hash h = { status: status, state: state, inputs: inputs.to_hash } end |