Module: Handoff::ArgumentNormalizer
- Defined in:
- lib/handoff/argument_normalizer.rb
Overview
Handoff internal.
Instance Method Summary collapse
Instance Method Details
#to_method_map ⇒ Object
5 6 7 8 |
# File 'lib/handoff/argument_normalizer.rb', line 5 def to_method_map return first if size == 1 && first.respond_to?(:each_pair) to_self_referencing_hash end |
#to_self_referencing_hash ⇒ Object
10 11 12 13 14 |
# File 'lib/handoff/argument_normalizer.rb', line 10 def to_self_referencing_hash hash = Hash.new each {|method_symbol| hash[method_symbol] = method_symbol} hash end |