Class: BCDice::DiceTable::D66OneThirdTable
- Inherits:
-
D66GridTable
- Object
- D66GridTable
- BCDice::DiceTable::D66OneThirdTable
- Defined in:
- lib/bcdice/dice_table/d66_one_third_table.rb
Overview
D66を振って6x6マスの表を参照する
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, items_1_2, items_3_4, items_5_6) ⇒ D66OneThirdTable
constructor
A new instance of D66OneThirdTable.
Methods inherited from D66GridTable
Constructor Details
#initialize(name, items_1_2, items_3_4, items_5_6) ⇒ D66OneThirdTable
Returns a new instance of D66OneThirdTable.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/bcdice/dice_table/d66_one_third_table.rb', line 21 def initialize(name, items_1_2, items_3_4, items_5_6) @name = name @items = [ items_1_2, items_1_2, items_3_4, items_3_4, items_5_6, items_5_6, ].freeze end |
Class Method Details
.from_i18n(key, locale) ⇒ D66OneThirdTable
12 13 14 15 |
# File 'lib/bcdice/dice_table/d66_one_third_table.rb', line 12 def self.from_i18n(key, locale) table = I18n.t(key, locale: locale, raise: true) new(table[:name], table[:items_1_2], table[:items_3_4], table[:items_5_6]) end |