Module: InsensitiveHash

Defined in:
lib/jx/js_hash.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object





40
41
42
# File 'lib/jx/js_hash.rb', line 40

def [](key)
  super(key)
end

#[]=(key, value) ⇒ Object





64
65
66
# File 'lib/jx/js_hash.rb', line 64

def []=(key, value)
  super(key, value)
end

#assoc(key, to_sym = false) ⇒ Object





56
57
58
# File 'lib/jx/js_hash.rb', line 56

def assoc(key, to_sym = false)
  (to_sym)? super(key.to_sym) : super(key)
end

#fetch(key, to_sym = true) ⇒ Object





48
49
50
# File 'lib/jx/js_hash.rb', line 48

def fetch(key, to_sym = true)
  (to_sym)? super(key.to_sym) : super(key)
end

#is_instance_of(class_name) ⇒ Object





31
32
33
34
# File 'lib/jx/js_hash.rb', line 31

def is_instance_of(class_name)
  klass = Object.const_get(class_name)
  instance_of? klass
end

#store(key, value, to_sym = true) ⇒ Object





72
73
74
# File 'lib/jx/js_hash.rb', line 72

def store(key, value, to_sym = true)
  (to_sym)? super(key.to_sym, value) : super(key, value)
end