Exception: LSync::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lsync/error.rb

Overview

Base exception class which keeps track of related components.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, components = {}) ⇒ Error

Returns a new instance of Error.


25
26
27
28
# File 'lib/lsync/error.rb', line 25

def initialize(reason, components = {})
	@reason = reason
	@components = components
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components


35
36
37
# File 'lib/lsync/error.rb', line 35

def components
  @components
end

#reasonObject (readonly)

Returns the value of attribute reason


34
35
36
# File 'lib/lsync/error.rb', line 34

def reason
  @reason
end

Instance Method Details

#to_sObject


30
31
32
# File 'lib/lsync/error.rb', line 30

def to_s
	@reason
end