Class: Yao::Resources::Meter

Inherits:
Base
  • Object
show all
Includes:
ProjectAssociationable
Defined in:
lib/yao/resources/meter.rb

Instance Attribute Summary

Attributes included from RestfullyAccessible

#service

Instance Method Summary collapse

Methods included from ProjectAssociationable

included, #project

Methods inherited from Base

#[], #[]=, add_instantiation_name_list, #destroy, friendly_attributes, #initialize, instantiation?, map_attribute_to_attribute, map_attribute_to_resource, map_attribute_to_resources, map_attributes_to_time, #to_hash, #update

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

#idString

Returns:

  • (String)


9
10
11
# File 'lib/yao/resources/meter.rb', line 9

def id
  meter_id
end

#resourceYao::Resources::Resource



14
15
16
# File 'lib/yao/resources/meter.rb', line 14

def resource
  @resource ||= Yao::Resource.get(resource_id)
end

#userYao::Resources::User



19
20
21
# File 'lib/yao/resources/meter.rb', line 19

def user
  @user ||= Yao::User.get(user_id)
end