Class: Dota::API::Match::Draft

Inherits:
Entity
  • Object
show all
Defined in:
lib/dota/api/match/draft.rb

Instance Attribute Summary

Attributes inherited from Entity

#raw

Instance Method Summary collapse

Methods inherited from Entity

#initialize

Methods included from Utilities::Inspectable

#inspect

Constructor Details

This class inherits a constructor from Dota::API::Entity

Instance Method Details

#heroObject



17
18
19
# File 'lib/dota/api/match/draft.rb', line 17

def hero
  Hero.new(raw["hero_id"])
end

#orderObject



5
6
7
# File 'lib/dota/api/match/draft.rb', line 5

def order
  raw["order"] + 1
end

#pick?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/dota/api/match/draft.rb', line 9

def pick?
  raw["is_pick"]
end

#teamObject



13
14
15
# File 'lib/dota/api/match/draft.rb', line 13

def team
  raw["team"] == 0 ? :radiant : :dire
end