Class: Spoll::Models::Event

Inherits:
Base
  • Object
show all
Defined in:
lib/spoll/models/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#set_array_relation, #set_relation

Instance Attribute Details

#event_typeObject

Returns the value of attribute event_type.



3
4
5
# File 'lib/spoll/models/event.rb', line 3

def event_type
  @event_type
end

#matchObject

Returns the value of attribute match.



3
4
5
# File 'lib/spoll/models/event.rb', line 3

def match
  @match
end

Instance Method Details

#set_relations(response) ⇒ Object



12
13
14
15
# File 'lib/spoll/models/event.rb', line 12

def set_relations(response)
  set_relation(:event_type, response.event_types, 'id', :event_type_id)
  set_relation(:match, response.matches, 'id', :match_id)
end