Class: Yao::Resources::Meter
- Includes:
- TenantAssociationable
- Defined in:
- lib/yao/resources/meter.rb
Instance Attribute Summary
Attributes included from RestfullyAccessible
Instance Method Summary collapse
Methods included from TenantAssociationable
Methods inherited from Base
#[], #[]=, #created, friendly_attributes, #initialize, map_attribute_to_attribute, map_attribute_to_resource, map_attribute_to_resources, #to_hash, #updated
Methods included from RestfullyAccessible
#admin=, #api_version, #api_version=, #as_member, #client, #create, #destroy, extended, #find_by_name, #get, #get!, #list, #resources_path, #resources_path=, #return_single_on_querying, #return_single_on_querying=, #update
Constructor Details
This class inherits a constructor from Yao::Resources::Base
Instance Method Details
#id ⇒ Object
8 9 10 |
# File 'lib/yao/resources/meter.rb', line 8 def id meter_id end |
#resource ⇒ Object
12 13 14 |
# File 'lib/yao/resources/meter.rb', line 12 def resource @resource ||= Yao::Resource.get(resource_id) end |
#user ⇒ Object
16 17 18 |
# File 'lib/yao/resources/meter.rb', line 16 def user @user ||= Yao::User.get(user_id) end |