Class: Bigrig::Application
- Defined in:
- lib/bigrig/models/application.rb
Instance Attribute Summary collapse
-
#containers ⇒ Object
Returns the value of attribute containers.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(args = {}) ⇒ Application
Returns a new instance of Application.
7 8 9 10 |
# File 'lib/bigrig/models/application.rb', line 7 def initialize(args = {}) @containers = [] super end |
Instance Attribute Details
#containers ⇒ Object
Returns the value of attribute containers.
5 6 7 |
# File 'lib/bigrig/models/application.rb', line 5 def containers @containers end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/bigrig/models/application.rb', line 5 def name @name end |
Class Method Details
.from_json(json) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/bigrig/models/application.rb', line 13 def from_json(json) containers = json.map do |name, value| Container.from_json name, value end Application.new containers: containers end |