Module: Kolom::CoreExtensions::HashMethods

Included in:
Hash
Defined in:
lib/kolom/core_extensions.rb

Overview

Define extensions for Hash class

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



37
38
39
40
41
42
43
44
# File 'lib/kolom/core_extensions.rb', line 37

def method_missing(method_name, *args, &block)
  bengali_method = Kolom::KEYWORDS.key(method_name.to_s)
  if bengali_method
    send(Kolom::KEYWORDS[bengali_method].to_sym, *args, &block)
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/kolom/core_extensions.rb', line 46

def respond_to_missing?(method_name, include_private = false)
  Kolom::KEYWORDS.key(method_name.to_s) || super
end