Class: Brut::CLI::Commands::RaiseError

Inherits:
BaseCommand show all
Defined in:
lib/brut/cli/commands/raise_error.rb

Instance Attribute Summary collapse

Attributes inherited from BaseCommand

#parent_command

Instance Method Summary collapse

Methods inherited from BaseCommand

#accepts, #args_description, #argv, #commands, #default_command, #default_command_class, #description, #env, #env_vars, #execute, #name, #options, #opts, #puts, #stderr, #stdin, #stdout, #system!

Constructor Details

#initialize(exception) ⇒ RaiseError

Returns a new instance of RaiseError.



3
4
5
# File 'lib/brut/cli/commands/raise_error.rb', line 3

def initialize(exception)
  @exception = exception
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



2
3
4
# File 'lib/brut/cli/commands/raise_error.rb', line 2

def exception
  @exception
end

Instance Method Details

#bootstrap?Boolean

Returns:

  • (Boolean)


9
# File 'lib/brut/cli/commands/raise_error.rb', line 9

def bootstrap? = false

#default_rack_envObject



10
# File 'lib/brut/cli/commands/raise_error.rb', line 10

def default_rack_env = nil

#runObject

Raises:



6
7
8
# File 'lib/brut/cli/commands/raise_error.rb', line 6

def run
  raise @exception
end