Class: Pathway::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/pathway.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, message: nil, details: nil) ⇒ Error

Returns a new instance of Error.



36
37
38
39
40
# File 'lib/pathway.rb', line 36

def initialize(type:, message: nil, details: nil)
  @type    = type.to_sym
  @message = message || default_message_for(type)
  @details = details || {}
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



31
32
33
# File 'lib/pathway.rb', line 31

def details
  @details
end

#messageObject (readonly)

Returns the value of attribute message.



31
32
33
# File 'lib/pathway.rb', line 31

def message
  @message
end

#typeObject (readonly)

Returns the value of attribute type.



31
32
33
# File 'lib/pathway.rb', line 31

def type
  @type
end