Exception: Shoppe::Error

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Error

Returns a new instance of Error.



4
5
6
7
8
9
10
# File 'lib/shoppe/error.rb', line 4

def initialize(options = {})
  if options.is_a?(String)
    @options = {:message => options}
  else
    @options = options
  end
end

Instance Method Details

#messageObject



12
13
14
# File 'lib/shoppe/error.rb', line 12

def message
  @options[:message]
end

#optionsObject



16
17
18
# File 'lib/shoppe/error.rb', line 16

def options
  @options
end