Module: Rooftop::Base::ClassMethods
- Defined in:
- lib/rooftop/base.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#api_namespace ⇒ Object
Returns the value of attribute api_namespace.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
Instance Method Summary collapse
-
#first ⇒ Object
Allow calling ‘first’.
- #setup_path! ⇒ Object
Instance Attribute Details
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
41 42 43 |
# File 'lib/rooftop/base.rb', line 41 def api_endpoint @api_endpoint end |
#api_namespace ⇒ Object
Returns the value of attribute api_namespace.
41 42 43 |
# File 'lib/rooftop/base.rb', line 41 def api_namespace @api_namespace end |
#api_version ⇒ Object
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
#first ⇒ Object
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 |