Class: Linkage::Configuration::DSL::FunctionWrapper
- Inherits:
-
DataWrapper
- Object
- DataWrapper
- Linkage::Configuration::DSL::FunctionWrapper
- Defined in:
- lib/linkage/configuration.rb
Instance Attribute Summary
Attributes inherited from DataWrapper
Instance Method Summary collapse
-
#initialize(dsl, klass, args) ⇒ FunctionWrapper
constructor
A new instance of FunctionWrapper.
Methods inherited from DataWrapper
#compare_with, #method_missing
Constructor Details
#initialize(dsl, klass, args) ⇒ FunctionWrapper
Returns a new instance of FunctionWrapper.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/linkage/configuration.rb', line 138 def initialize(dsl, klass, args) @dsl = dsl side = dataset = nil static = true function_args = [] args.each do |arg| if arg.kind_of?(DataWrapper) raise "conflicting sides" if side && side != arg.side side = arg.side static &&= arg.static? dataset = arg.dataset function_args << arg.object else function_args << arg end end @meta_object = MetaObject.new(klass.new(*function_args), side) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Linkage::Configuration::DSL::DataWrapper