Sha256: 28b3bd4a3f8ceed5dfb387b155e63b242e9aa0c4a1a0367b46eb35b9fd31249d

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 Bytes

Contents

module Parklife
  Error = Class.new(StandardError)
  BuildDirNotDefinedError = Class.new(Error)
  RackAppNotDefinedError = Class.new(Error)

  class HTTPError < Error
    def initialize(path:, status:)
      @path = path
      @status = status
    end

    def message
      %Q(#{status} response from path "#{path}")
    end

    private
      attr_reader :path, :status
  end

  class RailsNotDefinedError < Error
    def message
      'Expected Rails to be defined, require config/environment before parklife.'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
parklife-0.3.0 lib/parklife/errors.rb
parklife-0.2.0 lib/parklife/errors.rb