Class: Dota::API::Match::Draft
- Inherits:
-
Entity
- Object
- Entity
- Dota::API::Match::Draft
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
#inspect
Instance Method Details
#hero ⇒ Object
17
18
19
|
# File 'lib/dota/api/match/draft.rb', line 17
def hero
Hero.new(raw["hero_id"])
end
|
#order ⇒ Object
5
6
7
|
# File 'lib/dota/api/match/draft.rb', line 5
def order
raw["order"] + 1
end
|
#pick? ⇒ Boolean
9
10
11
|
# File 'lib/dota/api/match/draft.rb', line 9
def pick?
raw["is_pick"]
end
|
#team ⇒ Object
13
14
15
|
# File 'lib/dota/api/match/draft.rb', line 13
def team
raw["team"] == 0 ? :radiant : :dire
end
|