Module: Tito::Eventable::ClassMethods

Included in:
Tito::Event
Defined in:
lib/tito/eventable.rb

Overview

def event=(tito_event)

self.event_id = tito_event.id
self.attributes[:event] = tito_event
@event = tito_event

end

Instance Method Summary collapse

Instance Method Details

#[](url, options = {}) ⇒ Object



31
32
33
# File 'lib/tito/eventable.rb', line 31

def [](url, options = {})
  self.for_event(url, options)
end

#for_event(url, options = {}) ⇒ Object



27
28
29
# File 'lib/tito/eventable.rb', line 27

def for_event(url, options = {})
  RequestProxy.new(proxy_class: self, proxy_path: url, api_key: options.delete(:api_key))
end