Class: Chef::Resource::ChefEnvironment
- Inherits:
-
Cheffish::BaseResource
- Object
- Chef::Resource
- Cheffish::BaseResource
- Chef::Resource::ChefEnvironment
- Defined in:
- lib/chef/resource/chef_environment.rb
Constant Summary
Constants included from Cheffish::BaseProperties
Cheffish::BaseProperties::ArrayType
Instance Attribute Summary collapse
-
#default_attribute_modifiers ⇒ Object
readonly
default ‘ip_address’, ‘127.0.0.1’ default [ ‘pushy’, ‘port’ ], ‘9000’ default ‘ip_addresses’ do |existing_value| (existing_value || []) + [ ‘127.0.0.1’ ] end default ‘ip_address’, :delete.
-
#override_attribute_modifiers ⇒ Object
readonly
override ‘ip_address’, ‘127.0.0.1’ override [ ‘pushy’, ‘port’ ], ‘9000’ override ‘ip_addresses’ do |existing_value| (existing_value || []) + [ ‘127.0.0.1’ ] end override ‘ip_address’, :delete.
Instance Method Summary collapse
- #default(attribute_path, value = NOT_PASSED, &block) ⇒ Object (also: #attribute)
- #override(attribute_path, value = NOT_PASSED, &block) ⇒ Object
Methods included from Cheffish::BaseProperties
Instance Attribute Details
#default_attribute_modifiers ⇒ Object (readonly)
default ‘ip_address’, ‘127.0.0.1’ default [ ‘pushy’, ‘port’ ], ‘9000’ default ‘ip_addresses’ do |existing_value|
(existing_value || []) + [ '127.0.0.1' ]
end default ‘ip_address’, :delete
25 26 27 |
# File 'lib/chef/resource/chef_environment.rb', line 25 def default_attribute_modifiers @default_attribute_modifiers end |
#override_attribute_modifiers ⇒ Object (readonly)
override ‘ip_address’, ‘127.0.0.1’ override [ ‘pushy’, ‘port’ ], ‘9000’ override ‘ip_addresses’ do |existing_value|
(existing_value || []) + [ '127.0.0.1' ]
end override ‘ip_address’, :delete
43 44 45 |
# File 'lib/chef/resource/chef_environment.rb', line 43 def override_attribute_modifiers @override_attribute_modifiers end |
Instance Method Details
#default(attribute_path, value = NOT_PASSED, &block) ⇒ Object Also known as: attribute
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/chef/resource/chef_environment.rb', line 26 def default(attribute_path, value = NOT_PASSED, &block) @default_attribute_modifiers ||= [] if value != NOT_PASSED @default_attribute_modifiers << [ attribute_path, value ] elsif block @default_attribute_modifiers << [ attribute_path, block ] else raise "default requires either a value or a block" end end |
#override(attribute_path, value = NOT_PASSED, &block) ⇒ Object
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/chef/resource/chef_environment.rb', line 44 def override(attribute_path, value = NOT_PASSED, &block) @override_attribute_modifiers ||= [] if value != NOT_PASSED @override_attribute_modifiers << [ attribute_path, value ] elsif block @override_attribute_modifiers << [ attribute_path, block ] else raise "override requires either a value or a block" end end |