Sha256: 9346eff0be0152fd415fd86b486ef15ed77bf00fc4149f7274ce357e86644386
Contents?: true
Size: 425 Bytes
Versions: 14
Compression:
Stored size: 425 Bytes
Contents
# coding: utf-8 module Nephos class Params def initialize(hash={}) raise ArgumentError, "the first argument must be a Hash" unless hash.is_a? Hash @hash = Hash[hash.map{|k,v| [k.to_s, v]}] end def method_missing m, *a @hash.send(m, *(a.map(&:to_s))) @hash.send(m, *a) end def [] i @hash[i.to_s] end def []= i, v @hash[i.to_s] = v.to_s end end end
Version data entries
14 entries across 14 versions & 1 rubygems