Module: UseCaseValidations::Target::ClassMethods
- Defined in:
- lib/usecasing_validations/target.rb
Instance Method Summary collapse
Instance Method Details
#options ⇒ Object
27 28 29 |
# File 'lib/usecasing_validations/target.rb', line 27 def Helpers._get_instance_variable(self, :options, {}) end |
#target(target_name, options = {}) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/usecasing_validations/target.rb', line 31 def target(target_name, = {}) @target_name, @options = target_name, if .key?(:in) define_method([:in]) { context.send([:in]) } define_method(target_name) { send([:in]).send(target_name) } else define_method(target_name) { context.send(target_name) } end end |
#target_name ⇒ Object
23 24 25 |
# File 'lib/usecasing_validations/target.rb', line 23 def target_name Helpers._get_instance_variable(self, :target_name, nil) end |