Module: Rooftop::Base::ClassMethods

Defined in:
lib/rooftop/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_endpointObject

Returns the value of attribute api_endpoint.



41
42
43
# File 'lib/rooftop/base.rb', line 41

def api_endpoint
  @api_endpoint
end

#api_namespaceObject

Returns the value of attribute api_namespace.



41
42
43
# File 'lib/rooftop/base.rb', line 41

def api_namespace
  @api_namespace
end

#api_versionObject

Returns the value of attribute api_version.



41
42
43
# File 'lib/rooftop/base.rb', line 41

def api_version
  @api_version
end

Instance Method Details

#firstObject

Allow calling ‘first’



64
65
66
# File 'lib/rooftop/base.rb', line 64

def first
  all.first
end

#setup_path!Object



58
59
60
61
# File 'lib/rooftop/base.rb', line 58

def setup_path!
  @api_endpoint ||= collection_path
  self.collection_path "#{@api_namespace}/v#{@api_version}/#{@api_endpoint}"
end