Class: BCDice::DiceTable::SaiFicSkillTable::Skill

Inherits:
Object
  • Object
show all
Defined in:
lib/bcdice/dice_table/sai_fic_skill_table/skill.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(category_name, skill_name, category_dice, row_dice, s_format) ⇒ Skill

Returns a new instance of Skill.



7
8
9
10
11
12
13
# File 'lib/bcdice/dice_table/sai_fic_skill_table/skill.rb', line 7

def initialize(category_name, skill_name, category_dice, row_dice, s_format)
  @category_name = category_name
  @name = skill_name
  @category_dice = category_dice
  @row_dice = row_dice
  @s_format = s_format
end

Instance Attribute Details

#category_diceObject (readonly)

Returns the value of attribute category_dice.



19
20
21
# File 'lib/bcdice/dice_table/sai_fic_skill_table/skill.rb', line 19

def category_dice
  @category_dice
end

#category_nameObject (readonly)

Returns the value of attribute category_name.



19
20
21
# File 'lib/bcdice/dice_table/sai_fic_skill_table/skill.rb', line 19

def category_name
  @category_name
end

#nameObject (readonly)

Returns the value of attribute name.



19
20
21
# File 'lib/bcdice/dice_table/sai_fic_skill_table/skill.rb', line 19

def name
  @name
end

#row_diceObject (readonly)

Returns the value of attribute row_dice.



19
20
21
# File 'lib/bcdice/dice_table/sai_fic_skill_table/skill.rb', line 19

def row_dice
  @row_dice
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/bcdice/dice_table/sai_fic_skill_table/skill.rb', line 15

def to_s
  format(@s_format, category_dice: @category_dice, row_dice: @row_dice, category_name: @category_name, skill_name: @name)
end