Module: SimplyCouch::Model::Properties

Defined in:
lib/simply_couch/model/properties.rb

Instance Method Summary collapse

Instance Method Details

#check_existing_properties(name, type) ⇒ Object



4
5
6
7
8
# File 'lib/simply_couch/model/properties.rb', line 4

def check_existing_properties(name, type)
  if properties.find{|property| name.to_sym == property.name.to_sym && property.class != type}
    raise "Property with the name (#{name}) already defined"
  end
end