Class: BattingStats
- Inherits:
-
Object
- Object
- BattingStats
- Defined in:
- lib/batter.rb
Instance Attribute Summary collapse
-
#ab ⇒ Object
Returns the value of attribute ab.
-
#avg ⇒ Object
Returns the value of attribute avg.
-
#bb ⇒ Object
Returns the value of attribute bb.
-
#des ⇒ Object
Returns the value of attribute des.
-
#hr ⇒ Object
Returns the value of attribute hr.
-
#so ⇒ Object
Returns the value of attribute so.
Instance Method Summary collapse
-
#initialize(element) ⇒ BattingStats
constructor
A new instance of BattingStats.
Constructor Details
#initialize(element) ⇒ BattingStats
Returns a new instance of BattingStats.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/batter.rb', line 91 def initialize(element) if element.attributes['des'] @des = element.attributes['des'] end @avg = element.attributes['avg'] @ab = element.attributes['ab'] @hr = element.attributes['hr'] @bb = element.attributes['bb'] @so = element.attributes['so'] end |
Instance Attribute Details
#ab ⇒ Object
Returns the value of attribute ab.
89 90 91 |
# File 'lib/batter.rb', line 89 def ab @ab end |
#avg ⇒ Object
Returns the value of attribute avg.
89 90 91 |
# File 'lib/batter.rb', line 89 def avg @avg end |
#bb ⇒ Object
Returns the value of attribute bb.
89 90 91 |
# File 'lib/batter.rb', line 89 def bb @bb end |
#des ⇒ Object
Returns the value of attribute des.
89 90 91 |
# File 'lib/batter.rb', line 89 def des @des end |
#hr ⇒ Object
Returns the value of attribute hr.
89 90 91 |
# File 'lib/batter.rb', line 89 def hr @hr end |
#so ⇒ Object
Returns the value of attribute so.
89 90 91 |
# File 'lib/batter.rb', line 89 def so @so end |