Class: OpponentStats
- Inherits:
-
Object
- Object
- OpponentStats
- Defined in:
- lib/pitcher.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) ⇒ OpponentStats
constructor
A new instance of OpponentStats.
Constructor Details
#initialize(element) ⇒ OpponentStats
Returns a new instance of OpponentStats.
121 122 123 124 125 126 127 128 129 130 |
# File 'lib/pitcher.rb', line 121 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.
119 120 121 |
# File 'lib/pitcher.rb', line 119 def ab @ab end |
#avg ⇒ Object
Returns the value of attribute avg.
119 120 121 |
# File 'lib/pitcher.rb', line 119 def avg @avg end |
#bb ⇒ Object
Returns the value of attribute bb.
119 120 121 |
# File 'lib/pitcher.rb', line 119 def bb @bb end |
#des ⇒ Object
Returns the value of attribute des.
119 120 121 |
# File 'lib/pitcher.rb', line 119 def des @des end |
#hr ⇒ Object
Returns the value of attribute hr.
119 120 121 |
# File 'lib/pitcher.rb', line 119 def hr @hr end |
#so ⇒ Object
Returns the value of attribute so.
119 120 121 |
# File 'lib/pitcher.rb', line 119 def so @so end |