Class: FootStats::Live::Goal
- Inherits:
-
Object
- Object
- FootStats::Live::Goal
- Defined in:
- lib/foot_stats/live_goal.rb
Instance Attribute Summary collapse
-
#minute ⇒ Object
readonly
Returns the value of attribute minute.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
-
#player_name ⇒ Object
readonly
Returns the value of attribute player_name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params) ⇒ Goal
constructor
A new instance of Goal.
Constructor Details
#initialize(params) ⇒ Goal
Returns a new instance of Goal.
6 7 8 9 10 11 |
# File 'lib/foot_stats/live_goal.rb', line 6 def initialize(params) @player_name = params['@Jogador'] @period = params['@Periodo'] @minute = params['@Minuto'].to_i @type = params['@Tipo'] end |
Instance Attribute Details
#minute ⇒ Object (readonly)
Returns the value of attribute minute.
4 5 6 |
# File 'lib/foot_stats/live_goal.rb', line 4 def minute @minute end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
4 5 6 |
# File 'lib/foot_stats/live_goal.rb', line 4 def period @period end |
#player_name ⇒ Object (readonly)
Returns the value of attribute player_name.
4 5 6 |
# File 'lib/foot_stats/live_goal.rb', line 4 def player_name @player_name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/foot_stats/live_goal.rb', line 4 def type @type end |