Class: Bogy::HashHandler

Inherits:
Handler show all
Defined in:
lib/bogy/handlers/hash_handler.rb

Instance Method Summary collapse

Methods inherited from Handler

#hash

Constructor Details

#initialize(hash) ⇒ HashHandler

Returns a new instance of HashHandler.

Raises:

  • (ArgumentError)


4
5
6
7
8
# File 'lib/bogy/handlers/hash_handler.rb', line 4

def initialize(hash)
  raise ArgumentError, "value should be of Hash type, not #{hash.class}" unless hash.is_a? Hash

  @hash = hash
end

Instance Method Details

#loadObject



10
11
12
# File 'lib/bogy/handlers/hash_handler.rb', line 10

def load
  @hash
end