Class: BCDice::CommonCommand::BarabaraDice::Result

Inherits:
Result
  • Object
show all
Defined in:
lib/bcdice/common_command/barabara_dice/result.rb

Overview

バラバラロールの結果を表すクラス

Instance Attribute Summary collapse

Attributes inherited from Result

#critical, #detailed_rands, #failure, #fumble, #rands, #secret, #success, #text

Instance Method Summary collapse

Methods inherited from Result

#condition=, critical, #critical?, failure, #failure?, fumble, #fumble?, nothing, #secret?, success, #success?

Constructor Details

#initialize(text = nil) ⇒ Result

Returns a new instance of Result.

Parameters:

  • text (String, nil) (defaults to: nil)

    結果の文章



14
15
16
17
18
# File 'lib/bcdice/common_command/barabara_dice/result.rb', line 14

def initialize(text = nil)
  super(text)

  @success_num = 0
end

Instance Attribute Details

#success_numInteger

Returns 成功数.

Returns:

  • (Integer)

    成功数



11
12
13
# File 'lib/bcdice/common_command/barabara_dice/result.rb', line 11

def success_num
  @success_num
end