Class: Wowr::Classes::Defense

Inherits:
Object
  • Object
show all
Defined in:
lib/wowr/character.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ Defense

Returns a new instance of Defense.



616
617
618
619
620
621
622
# File 'lib/wowr/character.rb', line 616

def initialize(elem)
	@value 						= elem[:value].to_i
	@increase_percent = elem[:increasePercent].to_f
	@decrease_percent = elem[:decreasePercent].to_f
	@plus_defense 		= elem[:plusDefense].to_i
	@rating 					= elem[:rating].to_i
end

Instance Attribute Details

#decrease_percentObject (readonly)

Returns the value of attribute decrease_percent.



614
615
616
# File 'lib/wowr/character.rb', line 614

def decrease_percent
  @decrease_percent
end

#increase_percentObject (readonly)

Returns the value of attribute increase_percent.



614
615
616
# File 'lib/wowr/character.rb', line 614

def increase_percent
  @increase_percent
end

#plus_defenseObject (readonly)

Returns the value of attribute plus_defense.



614
615
616
# File 'lib/wowr/character.rb', line 614

def plus_defense
  @plus_defense
end

#ratingObject (readonly)

Returns the value of attribute rating.



614
615
616
# File 'lib/wowr/character.rb', line 614

def rating
  @rating
end

#valueObject (readonly)

Returns the value of attribute value.



614
615
616
# File 'lib/wowr/character.rb', line 614

def value
  @value
end