Exception: Lite::Command::Fault

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lite/command/fault.rb

Direct Known Subclasses

Error, Failure, Invalid, Noop

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, caused_by, thrown_by) ⇒ Fault

Returns a new instance of Fault.



10
11
12
13
14
15
16
# File 'lib/lite/command/fault.rb', line 10

def initialize(reason, caused_by, thrown_by)
  super(reason)

  @reason = reason
  @caused_by = caused_by
  @thrown_by = thrown_by
end

Instance Attribute Details

#caused_byObject (readonly)

Returns the value of attribute caused_by.



8
9
10
# File 'lib/lite/command/fault.rb', line 8

def caused_by
  @caused_by
end

#reasonObject (readonly)

Returns the value of attribute reason.



8
9
10
# File 'lib/lite/command/fault.rb', line 8

def reason
  @reason
end

#thrown_byObject (readonly)

Returns the value of attribute thrown_by.



8
9
10
# File 'lib/lite/command/fault.rb', line 8

def thrown_by
  @thrown_by
end

Instance Method Details

#typeObject



18
19
20
# File 'lib/lite/command/fault.rb', line 18

def type
  @type ||= self.class.name.split("::").last.downcase
end