Class: Sow::Hasher

Inherits:
Object
  • Object
show all
Defined in:
lib/seed_drill/utils.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(key, *value, &block) ⇒ Object


27
28
29
30
# File 'lib/seed_drill/utils.rb', line 27

def method_missing(key, *value, &block)
  @hash ||= Hash.new
  @hash[key] = block || value.first
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash


26
27
28
# File 'lib/seed_drill/utils.rb', line 26

def hash
  @hash
end