Class: Para::Cloneable::IncludeTreeBuilder
- Inherits:
-
Object
- Object
- Para::Cloneable::IncludeTreeBuilder
- Defined in:
- lib/para/cloneable/include_tree_builder.rb
Instance Attribute Summary collapse
-
#cloneable_options ⇒ Object
readonly
Returns the value of attribute cloneable_options.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(resource, cloneable_options) ⇒ IncludeTreeBuilder
constructor
A new instance of IncludeTreeBuilder.
Constructor Details
#initialize(resource, cloneable_options) ⇒ IncludeTreeBuilder
Returns a new instance of IncludeTreeBuilder.
6 7 8 9 |
# File 'lib/para/cloneable/include_tree_builder.rb', line 6 def initialize(resource, ) @resource = resource @cloneable_options = .deep_dup end |
Instance Attribute Details
#cloneable_options ⇒ Object (readonly)
Returns the value of attribute cloneable_options.
4 5 6 |
# File 'lib/para/cloneable/include_tree_builder.rb', line 4 def @cloneable_options end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
4 5 6 |
# File 'lib/para/cloneable/include_tree_builder.rb', line 4 def resource @resource end |
Instance Method Details
#build ⇒ Object
11 12 13 14 15 |
# File 'lib/para/cloneable/include_tree_builder.rb', line 11 def build include_tree = build_cloneable_tree(resource, [:include]) [:include] = clean_include_tree(include_tree) end |