Class: Starcraft2::Profile::Match
- Inherits:
-
Object
- Object
- Starcraft2::Profile::Match
- Defined in:
- lib/starcraft2/profile/match.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#decision ⇒ Object
Returns the value of attribute decision.
-
#map ⇒ Object
Returns the value of attribute map.
-
#speed ⇒ Object
Returns the value of attribute speed.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Match
constructor
A new instance of Match.
Constructor Details
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
4 5 6 |
# File 'lib/starcraft2/profile/match.rb', line 4 def date @date end |
#decision ⇒ Object
Returns the value of attribute decision.
4 5 6 |
# File 'lib/starcraft2/profile/match.rb', line 4 def decision @decision end |
#map ⇒ Object
Returns the value of attribute map.
4 5 6 |
# File 'lib/starcraft2/profile/match.rb', line 4 def map @map end |
#speed ⇒ Object
Returns the value of attribute speed.
4 5 6 |
# File 'lib/starcraft2/profile/match.rb', line 4 def speed @speed end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/starcraft2/profile/match.rb', line 4 def type @type end |
Class Method Details
.build(match_json) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/starcraft2/profile/match.rb', line 10 def self.build(match_json) data = JSON.parse(match_json) data['matches'].map do |m| new(m) end end |