Class: Conglomerate::BuilderCall
- Inherits:
-
Object
- Object
- Conglomerate::BuilderCall
- Defined in:
- lib/conglomerate/builder_call.rb
Defined Under Namespace
Classes: BuilderCallInstance
Instance Attribute Summary collapse
-
#array ⇒ Object
Returns the value of attribute array.
-
#block ⇒ Object
Returns the value of attribute block.
-
#builder ⇒ Object
Returns the value of attribute builder.
-
#iterates ⇒ Object
Returns the value of attribute iterates.
-
#name ⇒ Object
Returns the value of attribute name.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BuilderCall
constructor
A new instance of BuilderCall.
- #run(context, objects, attrs, attr_name) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ BuilderCall
Returns a new instance of BuilderCall.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/conglomerate/builder_call.rb', line 5 def initialize( = {}) self.name = .fetch(:name, nil) self.opts = .fetch(:opts, {}) self.block = .fetch(:block) self.builder = .fetch(:builder) self.array = .fetch(:array) self.iterates = .fetch(:iterates) rescue KeyError => e raise ArgumentError, e..gsub("key not found", "missing argument") end |
Instance Attribute Details
#array ⇒ Object
Returns the value of attribute array.
3 4 5 |
# File 'lib/conglomerate/builder_call.rb', line 3 def array @array end |
#block ⇒ Object
Returns the value of attribute block.
3 4 5 |
# File 'lib/conglomerate/builder_call.rb', line 3 def block @block end |
#builder ⇒ Object
Returns the value of attribute builder.
3 4 5 |
# File 'lib/conglomerate/builder_call.rb', line 3 def builder @builder end |
#iterates ⇒ Object
Returns the value of attribute iterates.
3 4 5 |
# File 'lib/conglomerate/builder_call.rb', line 3 def iterates @iterates end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/conglomerate/builder_call.rb', line 3 def name @name end |
#opts ⇒ Object
Returns the value of attribute opts.
3 4 5 |
# File 'lib/conglomerate/builder_call.rb', line 3 def opts @opts end |
Instance Method Details
#run(context, objects, attrs, attr_name) ⇒ Object
17 18 19 |
# File 'lib/conglomerate/builder_call.rb', line 17 def run(context, objects, attrs, attr_name) BuilderCallInstance.new(self, context, objects, attrs, attr_name).run end |