Class: Dependency::Transformer
- Inherits:
-
Object
- Object
- Dependency::Transformer
- Defined in:
- lib/dependency.rb
Overview
:nodoc:
Instance Method Summary collapse
- #for?(aspect, dependent) ⇒ Boolean
-
#initialize(parent, aspect, dependent, method_name) ⇒ Transformer
constructor
A new instance of Transformer.
- #update(aspect = nil, message = {}) ⇒ Object
Constructor Details
#initialize(parent, aspect, dependent, method_name) ⇒ Transformer
Returns a new instance of Transformer.
131 132 133 |
# File 'lib/dependency.rb', line 131 def initialize(parent, aspect, dependent, method_name) @parent, @aspect, @dependent, @method_name = parent, aspect, dependent, method_name end |
Instance Method Details
#for?(aspect, dependent) ⇒ Boolean
137 138 139 |
# File 'lib/dependency.rb', line 137 def for?(aspect, dependent) @aspect == aspect && @dependent.equal?(dependent) end |
#update(aspect = nil, message = {}) ⇒ Object
134 135 136 |
# File 'lib/dependency.rb', line 134 def update(aspect = nil, = {}) FlexiCaller.new(@method_name, [:with], @parent).call_on(@dependent) if @aspect == aspect end |