Sha256: 72d0444a86808088059a1d39455f92c24ccb4c21b2ac7f158e3ec410375b0f8c

Contents?: true

Size: 395 Bytes

Versions: 5

Compression:

Stored size: 395 Bytes

Contents

class CallbackCommand
  prepend EasyCommand

  def initialize(add_error: false, with_subcommand: false)
    @add_error = add_error
    @with_subcommand = with_subcommand
  end

  def call
    assert_subcommand(SubCommand) if @with_subcommand
    errors.add(:something, :forbidden) if @add_error
  end

  def on_success
    code_execution __method__
  end

  def code_execution(method)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
easy_command-1.0.1 spec/factories/callback_command.rb
easy_command-1.0.0 spec/factories/callback_command.rb
easy_command-1.0.0.pre.rc3 spec/factories/callback_command.rb
easy_command-1.0.0.pre.rc2 spec/factories/callback_command.rb
easy_command-1.0.0.pre.rc1 spec/factories/callback_command.rb