Class: FootStats::Live::Goal

Inherits:
Object
  • Object
show all
Defined in:
lib/foot_stats/live_goal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#minuteObject (readonly)

Returns the value of attribute minute.



4
5
6
# File 'lib/foot_stats/live_goal.rb', line 4

def minute
  @minute
end

#periodObject (readonly)

Returns the value of attribute period.



4
5
6
# File 'lib/foot_stats/live_goal.rb', line 4

def period
  @period
end

#player_nameObject (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

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/foot_stats/live_goal.rb', line 4

def type
  @type
end