Module: UseCaseValidations::Target
- Defined in:
- lib/usecasing_validations/target.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/usecasing_validations/target.rb', line 5 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#parent_target ⇒ Object
17 18 19 |
# File 'lib/usecasing_validations/target.rb', line 17 def parent_target parent_target_name ? send(parent_target_name) : nil end |
#parent_target_name ⇒ Object
9 10 11 |
# File 'lib/usecasing_validations/target.rb', line 9 def parent_target_name self.class..key?(:in) ? self.class.[:in] : nil end |
#target ⇒ Object
13 14 15 |
# File 'lib/usecasing_validations/target.rb', line 13 def target send(self.class.target_name) end |