Class: GenshinObject::Material

Inherits:
Object
  • Object
show all
Defined in:
lib/genshin_object/material.rb

Overview

Base class to represent various Genshin Materials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kamera_key:, name:, rarity:, source_category:, inventory_type:, source_sub_category: nil, family: nil, nation_name: nil) ⇒ Material

Returns a new instance of Material.



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/genshin_object/material.rb', line 9

def initialize(kamera_key:, name:, rarity:, source_category:, inventory_type:,
               source_sub_category: nil, family: nil, nation_name: nil)
  @kamera_key = kamera_key
  @name = name
  @rarity = rarity
  @source_category = source_category
  @source_sub_category = source_sub_category
  @family = family
  @inventory_type = inventory_type
  @nation_name = nation_name
end

Instance Attribute Details

#familyObject

Returns the value of attribute family.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def family
  @family
end

#inventory_typeObject

Returns the value of attribute inventory_type.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def inventory_type
  @inventory_type
end

#kamera_keyObject

Returns the value of attribute kamera_key.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def kamera_key
  @kamera_key
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def name
  @name
end

#nation_nameObject

Returns the value of attribute nation_name.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def nation_name
  @nation_name
end

#rarityObject

Returns the value of attribute rarity.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def rarity
  @rarity
end

#source_categoryObject

Returns the value of attribute source_category.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def source_category
  @source_category
end

#source_sub_categoryObject

Returns the value of attribute source_sub_category.



6
7
8
# File 'lib/genshin_object/material.rb', line 6

def source_sub_category
  @source_sub_category
end