Class: ForemanDeployments::ResourceModels::CreateResource
- Inherits:
-
ActiveModel::Model
- Object
- ActiveModel::Model
- ForemanDeployments::ResourceModels::CreateResource
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Dirty
- Defined in:
- app/models/foreman_deployments/resource_models/create_resource.rb
Instance Attribute Summary collapse
-
#computed_hash ⇒ Object
Returns the value of attribute computed_hash.
-
#definition_hash ⇒ Object
Returns the value of attribute definition_hash.
-
#resource_type ⇒ Object
Returns the value of attribute resource_type.
Instance Method Summary collapse
Instance Attribute Details
#computed_hash ⇒ Object
Returns the value of attribute computed_hash.
9 10 11 |
# File 'app/models/foreman_deployments/resource_models/create_resource.rb', line 9 def computed_hash @computed_hash end |
#definition_hash ⇒ Object
Returns the value of attribute definition_hash.
9 10 11 |
# File 'app/models/foreman_deployments/resource_models/create_resource.rb', line 9 def definition_hash @definition_hash end |
#resource_type ⇒ Object
Returns the value of attribute resource_type.
9 10 11 |
# File 'app/models/foreman_deployments/resource_models/create_resource.rb', line 9 def resource_type @resource_type end |
Instance Method Details
#new_resource ⇒ Object
11 12 13 14 15 |
# File 'app/models/foreman_deployments/resource_models/create_resource.rb', line 11 def new_resource computed_hash ||= definition_hash resource_type.new computed_hash end |