Sha256: 540df0e2da9579d387743eb228821cf98bb2ba2a6068483d0ab6738d6e070c60
Contents?: true
Size: 585 Bytes
Versions: 4
Compression:
Stored size: 585 Bytes
Contents
# frozen_string_literal: true module Tanita module Api module Client class BaseEntity def initialize(property_values = {}) @cached_property_values = {} @cached_property_values.merge!(property_values) end def to_h ret = {} self.class.properties.each do |property| ret[property.to_sym] = eval property.to_s end ret end def inspect "\#<#{self.class}:#{object_id} properties=#{self.class.properties.join(',')}>" end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems