Module: ContextIO::API::Resource::DeclarativeClassSyntax

Defined in:
lib/contextio/api/resource.rb

Overview

This module contains helper methods for ‘API::Resource`s’ class definitions. It gets ‘extend`ed into a class when `API::Resource` is `include`d.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#association_nameObject



143
144
145
# File 'lib/contextio/api/resource.rb', line 143

def association_name
  @association_name
end

#associationsObject (readonly)



150
151
152
# File 'lib/contextio/api/resource.rb', line 150

def associations
  @associations ||= []
end

Instance Method Details

#primary_keyObject



137
138
139
# File 'lib/contextio/api/resource.rb', line 137

def primary_key
  @primary_key
end