Class: GenshinObject::Weapon
- Inherits:
-
Object
- Object
- GenshinObject::Weapon
- Defined in:
- lib/genshin_object/weapon.rb
Overview
Base class to represent various Genshin Weapons
Constant Summary collapse
- WEAPON_TYPES =
%i[sword polearm catalyst bow claymore].freeze
Instance Attribute Summary collapse
-
#elite_material_type ⇒ Object
Returns the value of attribute elite_material_type.
-
#kamera_key ⇒ Object
Returns the value of attribute kamera_key.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rarity ⇒ Object
Returns the value of attribute rarity.
-
#standard_material_type ⇒ Object
Returns the value of attribute standard_material_type.
-
#weapon_material_type ⇒ Object
Returns the value of attribute weapon_material_type.
-
#weapon_type ⇒ Object
Returns the value of attribute weapon_type.
Instance Method Summary collapse
-
#initialize(kamera_key:, name:, rarity:, weapon_type:, elite_material_type:, standard_material_type:, weapon_material_type:) ⇒ Weapon
constructor
A new instance of Weapon.
Constructor Details
#initialize(kamera_key:, name:, rarity:, weapon_type:, elite_material_type:, standard_material_type:, weapon_material_type:) ⇒ Weapon
Returns a new instance of Weapon.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/genshin_object/weapon.rb', line 11 def initialize(kamera_key:, name:, rarity:, weapon_type:, elite_material_type:, standard_material_type:, weapon_material_type:) @kamera_key = kamera_key @name = name @rarity = rarity @weapon_type = weapon_type @elite_material_type = elite_material_type @standard_material_type = standard_material_type @weapon_material_type = weapon_material_type end |
Instance Attribute Details
#elite_material_type ⇒ Object
Returns the value of attribute elite_material_type.
8 9 10 |
# File 'lib/genshin_object/weapon.rb', line 8 def elite_material_type @elite_material_type end |
#kamera_key ⇒ Object
Returns the value of attribute kamera_key.
8 9 10 |
# File 'lib/genshin_object/weapon.rb', line 8 def kamera_key @kamera_key end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/genshin_object/weapon.rb', line 8 def name @name end |
#rarity ⇒ Object
Returns the value of attribute rarity.
8 9 10 |
# File 'lib/genshin_object/weapon.rb', line 8 def rarity @rarity end |
#standard_material_type ⇒ Object
Returns the value of attribute standard_material_type.
8 9 10 |
# File 'lib/genshin_object/weapon.rb', line 8 def standard_material_type @standard_material_type end |
#weapon_material_type ⇒ Object
Returns the value of attribute weapon_material_type.
8 9 10 |
# File 'lib/genshin_object/weapon.rb', line 8 def weapon_material_type @weapon_material_type end |
#weapon_type ⇒ Object
Returns the value of attribute weapon_type.
8 9 10 |
# File 'lib/genshin_object/weapon.rb', line 8 def weapon_type @weapon_type end |