Class: SnakyHash::Snake

Inherits:
Module
  • Object
show all
Defined in:
lib/snaky_hash/snake.rb

Defined Under Namespace

Modules: SnakyModulizer

Instance Method Summary collapse

Constructor Details

#initialize(key_type: :string) ⇒ Snake

Returns a new instance of Snake.



8
9
10
11
# File 'lib/snaky_hash/snake.rb', line 8

def initialize(key_type: :string)
  super()
  @key_type = key_type
end

Instance Method Details

#included(base) ⇒ Object



13
14
15
16
# File 'lib/snaky_hash/snake.rb', line 13

def included(base)
  conversions_module = SnakyModulizer.to_mod(@key_type)
  base.include(conversions_module)
end