lib/tanita/api/client/class_builder.rb in tanita-api-client-0.3.0 vs lib/tanita/api/client/class_builder.rb in tanita-api-client-0.3.1

- old
+ new

@@ -25,13 +25,13 @@ def self.create_class(class_name, property_names = []) super_klass = Class.new(BaseEntity) klass = Tanita::Api::Client.const_set(class_name, super_klass) define_properties_reader(klass) property_names.each do |property_name| - klass.properties << property_name if klass.respond_to?(:properties) + klass.properties << property_name define_getter_and_setter(klass, property_name) end - klass.properties.freeze if klass.respond_to?(:properties) + klass.properties.freeze end private_class_method :create_class def self.define_properties_reader(klass) klass.class_eval do