Method: TableSalt#initialize
- Defined in:
- lib/table_salt.rb
#initialize(attributes = {}) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/table_salt.rb', line 20 def initialize( attributes={} ) return unless attributes @attributes = attributes.stringify_keys multi_parameter_attributes, attributes = attributes.partition { |k,v| k =~ /^(.*)\((\di)\)$/ } attributes.each do |name, value| send "#{name}=", value end assign_multiparameter_attributes( multi_parameter_attributes ) end |