Module: Utils::ClassMethods

Defined in:
lib/blanket/utils.rb,
lib/blanket/utils.rb

Instance Method Summary collapse

Instance Method Details

#default_attributesObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/blanket/utils.rb', line 20

def default_attributes
  atts = {}
  attribute_symbols.each do |sym|
    sym_string = "default_"+sym.to_s
    default_sym = sym_string.to_sym
    val = self.send(default_sym)
    atts[sym.to_s] = val
  end
  atts
end