Class: BnetScraper::Starcraft2::Match

Inherits:
Object
  • Object
show all
Defined in:
lib/bnet_scraper/starcraft2/match.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dateObject

Returns the value of attribute date.



4
5
6
# File 'lib/bnet_scraper/starcraft2/match.rb', line 4

def date
  @date
end

#map_nameObject

Returns the value of attribute map_name.



4
5
6
# File 'lib/bnet_scraper/starcraft2/match.rb', line 4

def map_name
  @map_name
end

#outcomeObject

Returns the value of attribute outcome.



4
5
6
# File 'lib/bnet_scraper/starcraft2/match.rb', line 4

def outcome
  @outcome
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/bnet_scraper/starcraft2/match.rb', line 4

def type
  @type
end

Instance Method Details

#lost?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/bnet_scraper/starcraft2/match.rb', line 10

def lost?
  @outcome == :loss
end

#won?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/bnet_scraper/starcraft2/match.rb', line 6

def won?
  @outcome == :won
end