Method: Confix::InstanceMethods.included
- Defined in:
- lib/confix.rb
.included(target) ⇒ Object
165 166 167 168 169 170 171 172 173 174 |
# File 'lib/confix.rb', line 165 def self.included(target) # Delegate common hash functions to the hash. [ :each, :map, :select, :except, :symbolize_keys ].each do |method| target.class_eval <<-RUBY, __FILE__, __LINE__+1 def #{method}(*args, &block) to_hash.#{method} *args, &block end RUBY end end |