Class: Assembly::ApiModel

Inherits:
Model
  • Object
show all
Defined in:
lib/assembly/api_model.rb

Instance Attribute Summary

Attributes inherited from Model

#client, #id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#[], #[]=, #as_json, class_name, construct_from, #dirty?, #dirty_params, #each, #initialize, #keys, #merge, #to_hash, #to_json, #update_from, #values

Constructor Details

This class inherits a constructor from Assembly::Model

Class Method Details

.pathObject



7
8
9
# File 'lib/assembly/api_model.rb', line 7

def self.path
  "/#{Util.underscore(self.class_name)}s"
end

Instance Method Details

#pathObject



3
4
5
# File 'lib/assembly/api_model.rb', line 3

def path
  "#{self.class.path}/#{id}"
end