Module: Poise::Helpers::Subresources::Child
- Extended by:
- ClassMethods
- Defined in:
- lib/poise/helpers/subresources/child.rb
Overview
A resource mixin for child subresources.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.parent_attribute(name, type: Chef::Resource, optional: false, auto: true, default: nil)
extended
from ClassMethods
Create a new kind of parent link.
-
.parent_attributes ⇒ Hash<Symbol, Class>
extended
from ClassMethods
Return the name of all parent relationships on this class.
- .parent_auto(val = nil) ⇒ Object extended from ClassMethods
- .parent_default(*args) ⇒ Object extended from ClassMethods
- .parent_optional(val = nil) ⇒ Object extended from ClassMethods
- .parent_type(type = nil) ⇒ Object extended from ClassMethods
Instance Method Summary collapse
Class Method Details
.parent_attribute(name, type: Chef::Resource, optional: false, auto: true, default: nil) Originally defined in module ClassMethods
This method returns an undefined value.
Create a new kind of parent link.
.parent_attributes ⇒ Hash<Symbol, Class> Originally defined in module ClassMethods
Return the name of all parent relationships on this class.
#parent_auto ⇒ Boolean #parent_auto(val) ⇒ Boolean Originally defined in module ClassMethods
#parent_default ⇒ Object, Chef::DelayedEvaluator #parent_default(val) ⇒ Object, Chef::DelayedEvaluator Originally defined in module ClassMethods
#parent_optional ⇒ Boolean #parent_optional(val) ⇒ Boolean Originally defined in module ClassMethods
#parent_type ⇒ Class, Symbol #parent_type(type) ⇒ Class, Symbol Originally defined in module ClassMethods
Instance Method Details
#parent ⇒ Chef::Resource? #parent(val) ⇒ Chef::Resource?
63 64 65 66 67 68 69 |
# File 'lib/poise/helpers/subresources/child.rb', line 63 def parent(*args) # Lie about this method if the parent type is true. if self.class.parent_type == true raise NoMethodError.new("undefined method `parent' for #{self}") end _parent(:parent, self.class.parent_type, self.class.parent_optional, self.class.parent_auto, self.class.parent_default, *args) end |