Class: BCDice::DiceTable::RangeTable::RollResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/bcdice/dice_table/range_table.rb

Overview

表を振った結果を表す構造体

Instance Attribute Summary collapse

Instance Attribute Details

#contentObject

Returns 選ばれた項目の内容.

Returns:

  • (Object)

    選ばれた項目の内容



44
45
46
# File 'lib/bcdice/dice_table/range_table.rb', line 44

RollResult = Struct.new(:sum, :values, :content, :formatted) do
  alias_method :to_s, :formatted
end

#formattedString Also known as: to_s

Returns 整形された結果.

Returns:

  • (String)

    整形された結果



44
45
46
# File 'lib/bcdice/dice_table/range_table.rb', line 44

RollResult = Struct.new(:sum, :values, :content, :formatted) do
  alias_method :to_s, :formatted
end

#sumInteger

Returns 出目の合計.

Returns:

  • (Integer)

    出目の合計



44
45
46
# File 'lib/bcdice/dice_table/range_table.rb', line 44

RollResult = Struct.new(:sum, :values, :content, :formatted) do
  alias_method :to_s, :formatted
end

#valuesArray<Integer>

Returns 出目の配列.

Returns:

  • (Array<Integer>)

    出目の配列



44
45
46
# File 'lib/bcdice/dice_table/range_table.rb', line 44

RollResult = Struct.new(:sum, :values, :content, :formatted) do
  alias_method :to_s, :formatted
end