Class: Chef::Resource::ConditionalActionNotNothing
- Inherits:
-
Object
- Object
- Chef::Resource::ConditionalActionNotNothing
- Defined in:
- lib/chef/resource/conditional_action_not_nothing.rb
Instance Attribute Summary collapse
-
#current_action ⇒ Object
readonly
Returns the value of attribute current_action.
Instance Method Summary collapse
- #continue? ⇒ Boolean
- #description ⇒ Object
-
#initialize(current_action) ⇒ ConditionalActionNotNothing
constructor
A new instance of ConditionalActionNotNothing.
- #short_description ⇒ Object
- #to_text ⇒ Object
Constructor Details
#initialize(current_action) ⇒ ConditionalActionNotNothing
Returns a new instance of ConditionalActionNotNothing.
25 26 27 |
# File 'lib/chef/resource/conditional_action_not_nothing.rb', line 25 def initialize(current_action) @current_action = current_action end |
Instance Attribute Details
#current_action ⇒ Object (readonly)
Returns the value of attribute current_action.
23 24 25 |
# File 'lib/chef/resource/conditional_action_not_nothing.rb', line 23 def current_action @current_action end |
Instance Method Details
#continue? ⇒ Boolean
29 30 31 32 |
# File 'lib/chef/resource/conditional_action_not_nothing.rb', line 29 def continue? # @positivity == not_if @current_action != :nothing end |
#description ⇒ Object
38 39 40 |
# File 'lib/chef/resource/conditional_action_not_nothing.rb', line 38 def description "action :nothing" end |
#short_description ⇒ Object
34 35 36 |
# File 'lib/chef/resource/conditional_action_not_nothing.rb', line 34 def short_description description end |
#to_text ⇒ Object
42 43 44 |
# File 'lib/chef/resource/conditional_action_not_nothing.rb', line 42 def to_text "not_if { action == :nothing }" end |