Module: ActiveInteraction::Hashable

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/active_interaction/concerns/hashable.rb

Overview

Allow ‘hash` to be overridden when given arguments and/or a block.

Instance Method Summary collapse

Instance Method Details

#hash(*args, &block) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/active_interaction/concerns/hashable.rb', line 10

def hash(*args, &block)
  if args.empty? && !block_given?
    super
  else
    method_missing(:hash, *args, &block)
  end
end