Parent

Methods

ApipieBindings::IndifferentHash

Public Class Methods

new(constructor = {}) click to toggle source
# File lib/apipie_bindings/indifferent_hash.rb, line 5
def initialize(constructor = {})
  super()
  merge!(constructor)
end

Public Instance Methods

[](k) click to toggle source
# File lib/apipie_bindings/indifferent_hash.rb, line 10
def [](k)
  if has_key?(k)
    convert_value(super(k))
  elsif k.is_a?(Symbol) && has_key?(k.to_s)
    convert_value(super(k.to_s))
  elsif k.is_a?(String) && has_key?(k.to_sym)
    convert_value(super(k.to_sym))
  else
    convert_value(super(k))
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.