Sha256: b5ab9335806e7acb8ef2edf3edebbacf4fe1899e9e2d55e225b01aa145447e11

Contents?: true

Size: 482 Bytes

Versions: 11

Compression:

Stored size: 482 Bytes

Contents

require 'sparkle_formation'

class SparkleFormation

  class Error < StandardError

    class NotFound < KeyError
      attr_reader :name

      def initialize(*args)
        opts = args.detect{|o| o.is_a?(Hash)}
        args.delete(opts) if opts
        super(args)
        @name = opts[:name] if opts
      end

      class Dynamic < NotFound; end
      class Component < NotFound; end
      class Registry < NotFound; end
      class Template < NotFound; end

    end
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sparkle_formation-1.1.14 lib/sparkle_formation/error.rb
sparkle_formation-1.1.12 lib/sparkle_formation/error.rb
sparkle_formation-1.1.10 lib/sparkle_formation/error.rb
sparkle_formation-1.1.8 lib/sparkle_formation/error.rb
sparkle_formation-1.1.6 lib/sparkle_formation/error.rb
sparkle_formation-1.1.4 lib/sparkle_formation/error.rb
sparkle_formation-1.1.2 lib/sparkle_formation/error.rb
sparkle_formation-1.1.0 lib/sparkle_formation/error.rb
sparkle_formation-1.0.4 lib/sparkle_formation/error.rb
sparkle_formation-1.0.2 lib/sparkle_formation/error.rb
sparkle_formation-1.0.0 lib/sparkle_formation/error.rb