Class: Munna::Perform::Base
- Inherits:
-
Object
- Object
- Munna::Perform::Base
- Defined in:
- lib/munna/perform/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #cached_key ⇒ Object
-
#initialize(target, opts, execute) ⇒ Base
constructor
A new instance of Base.
- #method_name ⇒ Object
- #normalize(value) ⇒ Object
- #perform_delete ⇒ Object
- #perform_write ⇒ Object
Constructor Details
#initialize(target, opts, execute) ⇒ Base
Returns a new instance of Base.
4 5 6 7 8 |
# File 'lib/munna/perform/base.rb', line 4 def initialize(target, opts, execute) @target = target @opts = opts @execute = execute end |
Instance Method Details
#cached_key ⇒ Object
21 22 23 |
# File 'lib/munna/perform/base.rb', line 21 def cached_key @cached_key ||= Munna.get_key [target_name, method_name] end |
#method_name ⇒ Object
25 26 27 |
# File 'lib/munna/perform/base.rb', line 25 def method_name @opts[:key] || @execute.name || @opts[:caller_name] end |
#normalize(value) ⇒ Object
29 30 31 |
# File 'lib/munna/perform/base.rb', line 29 def normalize(value) value end |