Sha256: f0b69f8f1f4cc8e721970a5e46b4f6b86080669bc93ffb6167c7fc2fe9d9b013

Contents?: true

Size: 445 Bytes

Versions: 21

Compression:

Stored size: 445 Bytes

Contents

class Knj::Hash_methods < Hash
  def initialize(hash = {})
    self.update(hash)
  end
  
  def db
    return self[:db]
  end
  
  def ob
    return self[:ob]
  end
  
  def args
    return self[:args]
  end
  
  def data
    return self[:data]
  end
  
  def method_missing(method, *args)
    method = method.to_sym
    return self[method] if self.key?(method)
    
    raise "No such method '#{method}' on class '#{self.class.name}'"
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
knjrbfw-0.0.29 lib/knj/hash_methods.rb
knjrbfw-0.0.28 lib/knj/hash_methods.rb
knjrbfw-0.0.27 lib/knj/hash_methods.rb
knjrbfw-0.0.26 lib/knj/hash_methods.rb
knjrbfw-0.0.25 lib/knj/hash_methods.rb
knjrbfw-0.0.24 lib/knj/hash_methods.rb
knjrbfw-0.0.23 lib/knj/hash_methods.rb
knjrbfw-0.0.22 lib/knj/hash_methods.rb
knjrbfw-0.0.21 lib/knj/hash_methods.rb
knjrbfw-0.0.20 lib/knj/hash_methods.rb
knjrbfw-0.0.19 lib/knj/hash_methods.rb
knjrbfw-0.0.18 lib/knj/hash_methods.rb
knjrbfw-0.0.17 lib/knj/hash_methods.rb
knjrbfw-0.0.16 lib/knj/hash_methods.rb
knjrbfw-0.0.15 lib/knj/hash_methods.rb
knjrbfw-0.0.14 lib/knj/hash_methods.rb
knjrbfw-0.0.13 lib/knj/hash_methods.rb
knjrbfw-0.0.12 lib/knj/hash_methods.rb
knjrbfw-0.0.11 lib/knj/hash_methods.rb
knjrbfw-0.0.10 lib/knj/hash_methods.rb