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.

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#hash(*args, &block) ⇒ Object

Since:

  • 1.0.0



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

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