Class: InstanceAgent::CodeDeployPlugin::ApplicationSpecification::ContextInfo
- Inherits:
-
Object
- Object
- InstanceAgent::CodeDeployPlugin::ApplicationSpecification::ContextInfo
- Defined in:
- lib/instance_agent/codedeploy_plugin/application_specification/context_info.rb
Overview
Helper Class for storing a context
Instance Attribute Summary collapse
-
#range ⇒ Object
readonly
Returns the value of attribute range.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(context) ⇒ ContextInfo
constructor
A new instance of ContextInfo.
Constructor Details
#initialize(context) ⇒ ContextInfo
Returns a new instance of ContextInfo.
10 11 12 13 14 15 16 17 18 |
# File 'lib/instance_agent/codedeploy_plugin/application_specification/context_info.rb', line 10 def initialize(context) if context['type'].nil? raise AppSpecValidationException, "invalid context type required #{context.inspect}" end @user = context['name'] @role = nil @type = context['type'] @range = context['range'].nil? ? nil : RangeInfo.new(context['range']) end |
Instance Attribute Details
#range ⇒ Object (readonly)
Returns the value of attribute range.
8 9 10 |
# File 'lib/instance_agent/codedeploy_plugin/application_specification/context_info.rb', line 8 def range @range end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
8 9 10 |
# File 'lib/instance_agent/codedeploy_plugin/application_specification/context_info.rb', line 8 def role @role end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/instance_agent/codedeploy_plugin/application_specification/context_info.rb', line 8 def type @type end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
8 9 10 |
# File 'lib/instance_agent/codedeploy_plugin/application_specification/context_info.rb', line 8 def user @user end |