Class: Fantasyhub::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/fantasyhub/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Event

Returns a new instance of Event.



5
6
7
8
9
10
11
# File 'lib/fantasyhub/event.rb', line 5

def initialize(hash)
  @actor      =  hash.fetch(:actor)
  @event_type =  hash.fetch(:event_type)
  @repo_url   =  hash.fetch(:repo_url)
  @score      =  hash.fetch(:score)
  @created_at =  hash.fetch(:created_at)
end

Instance Attribute Details

#actorObject (readonly)

Returns the value of attribute actor.



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

def actor
  @actor
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#event_typeObject (readonly)

Returns the value of attribute event_type.



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

def event_type
  @event_type
end

#repo_urlObject (readonly)

Returns the value of attribute repo_url.



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

def repo_url
  @repo_url
end

#scoreObject (readonly)

Returns the value of attribute score.



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

def score
  @score
end