Class: Fantasyhub::Event
- Inherits:
-
Object
- Object
- Fantasyhub::Event
- Defined in:
- lib/fantasyhub/event.rb
Instance Attribute Summary collapse
-
#actor ⇒ Object
readonly
Returns the value of attribute actor.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#event_type ⇒ Object
readonly
Returns the value of attribute event_type.
-
#repo_url ⇒ Object
readonly
Returns the value of attribute repo_url.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Event
constructor
A new instance of Event.
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
#actor ⇒ Object (readonly)
Returns the value of attribute actor.
3 4 5 |
# File 'lib/fantasyhub/event.rb', line 3 def actor @actor end |
#created_at ⇒ Object (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_type ⇒ Object (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_url ⇒ Object (readonly)
Returns the value of attribute repo_url.
3 4 5 |
# File 'lib/fantasyhub/event.rb', line 3 def repo_url @repo_url end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
3 4 5 |
# File 'lib/fantasyhub/event.rb', line 3 def score @score end |