Sha256: 87d25f3b4918f83af7f4440f4bbc5dc36bfc89222a514333db9910ab849a89eb

Contents?: true

Size: 305 Bytes

Versions: 9

Compression:

Stored size: 305 Bytes

Contents

module Tienda
  class Error < StandardError
    def initialize(options = {})
      if options.is_a?(String)
        @options = {:message => options}
      else
        @options = options
      end
    end

    def message
      @options[:message]
    end

    def options
      @options
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tienda-2.1.3 lib/tienda/error.rb
tienda-2.1.2 lib/tienda/error.rb
tienda-2.1.1 lib/tienda/error.rb
tienda-2.1.0 lib/tienda/error.rb
tienda-2.0.2 lib/tienda/error.rb
tienda-2.0.1 lib/tienda/error.rb
tienda-1.1.2 lib/tienda/error.rb
tienda-1.1.1 lib/tienda/error.rb
tienda-1.1.0 lib/tienda/error.rb