Class: Tito::Event

Inherits:
Base
  • Object
show all
Extended by:
Tito::Eventable::ClassMethods
Defined in:
lib/tito/event.rb

Instance Attribute Summary

Attributes inherited from Base

#path_prefix

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Tito::Eventable::ClassMethods

[], for_event

Methods inherited from Base

all, all_path, all_url, #attributes, #attributes=, auth, #auth, #destroy, get, get_path, get_url, http, #http, #initialize, #method_missing, #new_record?, #persisted?, #post_url, #put_url, resource_name, resource_name=, resource_path=, #save, site, site=, ssl_context, #ssl_context, ssl_context=, underscore_class_name

Constructor Details

This class inherits a constructor from Tito::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Tito::Base

Class Method Details

.resource_path(request_type = nil) ⇒ Object



6
7
8
9
# File 'lib/tito/event.rb', line 6

def self.resource_path(request_type = nil)
  return "events" if request_type == :all
  nil
end

Instance Method Details

#pathObject



11
12
13
# File 'lib/tito/event.rb', line 11

def path
  "#{}/#{slug}"  
end

#post_pathObject



19
20
21
# File 'lib/tito/event.rb', line 19

def post_path
  "#{}/events"
end

#put_pathObject



15
16
17
# File 'lib/tito/event.rb', line 15

def put_path
  path
end