Module: RTrail::Methods::Get::ClassMethods

Defined in:
lib/rtrail/methods.rb

Instance Method Summary collapse

Instance Method Details

#get(entity_id) ⇒ Object

Get data for the entity with the given ID, and return a new Entity subclass instance. Wraps ‘GET get_<entity>/<id>`



14
15
16
17
# File 'lib/rtrail/methods.rb', line 14

def get(entity_id)
  entity_data = client.get("get_#{self.basename}/#{entity_id}")
  return self.new(entity_data)
end