Module: Ccp::Data::Ext

Defined in:
lib/ccp/data.rb

Instance Method Summary collapse

Instance Method Details

#merge(options) ⇒ Object



12
13
14
15
16
# File 'lib/ccp/data.rb', line 12

def merge(options)
  options.each_pair do |key,val|
    self[key] = val
  end
end

#merge_default(options) ⇒ Object



18
19
20
21
22
# File 'lib/ccp/data.rb', line 18

def merge_default(options)
  options.each_pair do |key,val|
    default[key] = val
  end
end

#path(key) ⇒ Object



8
9
10
# File 'lib/ccp/data.rb', line 8

def path(key)
  self[key].must.coerced(Pathname, String=>proc{|i| Pathname(i)})
end