class Tanita::Api::Client::BaseEntity

Public Class Methods

new(property_values = {}) click to toggle source
# File lib/tanita/api/client/base_entity.rb, line 7
def initialize(property_values = {})
  @cached_property_values = {}
  @cached_property_values.merge!(property_values)
end

Public Instance Methods

inspect() click to toggle source
# File lib/tanita/api/client/base_entity.rb, line 20
def inspect
  "\#<#{self.class}:#{object_id} properties=#{self.class.properties.join(',')}>"
end
to_h() click to toggle source
# File lib/tanita/api/client/base_entity.rb, line 12
def to_h
  ret = {}
  self.class.properties.each do |property|
    ret[property.to_sym] = eval property.to_s # rubocop:disable Security/Eval
  end
  ret
end