Exception: Tienda::Error

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Error

Returns a new instance of Error.



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

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

Instance Method Details

#messageObject



11
12
13
# File 'lib/tienda/error.rb', line 11

def message
  @options[:message]
end

#optionsObject



15
16
17
# File 'lib/tienda/error.rb', line 15

def options
  @options
end