Class: Dota::API::Match::Unit

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, items) ⇒ Unit

Returns a new instance of Unit.



7
8
9
10
# File 'lib/dota/api/match/unit.rb', line 7

def initialize(name, items)
  @name = name.titlecase
  @items = items
end

Instance Attribute Details

#itemsObject (readonly)

Returns the value of attribute items.



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

def items
  @items
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end