Sha256: 9f62f62b74172482932e727e4625690ee9427d7104ae3d8143ddf01f124195e3
Contents?: true
Size: 578 Bytes
Versions: 15
Compression:
Stored size: 578 Bytes
Contents
module Yao::Resources class Sample < Base friendly_attributes :id, :metadata, :meter, :source, :type, :unit, :volume, :resource_id, :user_id def recorded_at Time.parse(self["recorded_at"]) end def timestamp Time.parse(self["timestamp"]) end def resource @resource ||= Yao::Resource.get(resource_id) end def user @user ||= Yao::User.get(user_id) end self.service = "metering" self.api_version = "v2" self.resources_name = "samples" end end
Version data entries
15 entries across 15 versions & 1 rubygems