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