Sha256: b638e8a262532d8f89974a189657d3ce0585548afa82573d5803c69c06a222db

Contents?: true

Size: 328 Bytes

Versions: 4

Compression:

Stored size: 328 Bytes

Contents

module CampfireExport
  class Exception < StandardError

    attr_reader :resource, :message, :code

    def initialize(resource, message, code=nil)
      @resource = resource
      @message  = message
      @code     = code
    end

    def to_s
      "<#{resource}>: #{message}" + (code ? " (#{code})" : "")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stackbuilders-campfire_export-0.5.1 lib/campfire_export/exception.rb
stackbuilders-campfire_export-0.5.0 lib/campfire_export/exception.rb
stackbuilders-campfire_export-0.4.1 lib/campfire_export/exception.rb
stackbuilders-campfire_export-0.4.0 lib/campfire_export/exception.rb