Exception: Shellfie::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/shellfie/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, category: nil, context: {}) ⇒ Error

Returns a new instance of Error.



7
8
9
10
11
# File 'lib/shellfie/errors.rb', line 7

def initialize(message = nil, category: nil, context: {})
  @category = category
  @context = context.freeze
  super(message)
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



5
6
7
# File 'lib/shellfie/errors.rb', line 5

def category
  @category
end

#contextObject (readonly)

Returns the value of attribute context.



5
6
7
# File 'lib/shellfie/errors.rb', line 5

def context
  @context
end