Class: BCDice::DiceTable::D66HalfGridTable
- Inherits:
-
D66GridTable
- Object
- D66GridTable
- BCDice::DiceTable::D66HalfGridTable
- Defined in:
- lib/bcdice/dice_table/d66_half_grid_table.rb
Overview
D66を振って6x6マスの表を参照する
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, items_1_2_3, items_4_5_6) ⇒ D66HalfGridTable
constructor
A new instance of D66HalfGridTable.
Methods inherited from D66GridTable
Constructor Details
#initialize(name, items_1_2_3, items_4_5_6) ⇒ D66HalfGridTable
Returns a new instance of D66HalfGridTable.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bcdice/dice_table/d66_half_grid_table.rb', line 20 def initialize(name, items_1_2_3, items_4_5_6) @name = name @items = [ items_1_2_3, items_1_2_3, items_1_2_3, items_4_5_6, items_4_5_6, items_4_5_6, ].freeze end |
Class Method Details
.from_i18n(key, locale) ⇒ D66HalfGridTable
12 13 14 15 |
# File 'lib/bcdice/dice_table/d66_half_grid_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_3], table[:items_4_5_6]) end |