Sha256: dbde1b55efa7c6b446aa26c7f0448b39a25a4f1ea49ba44b92f1e39b0faebfe4

Contents?: true

Size: 558 Bytes

Versions: 14

Compression:

Stored size: 558 Bytes

Contents

module BBK
  module App
    class Dispatcher
      class Result

        attr_accessor :route, :message

        def initialize(route, message)
          @route = route.is_a?(String) ? Dispatcher::Route.new(route) : route

          raise 'route must be of type Dispatcher::Route' unless @route.is_a?(Dispatcher::Route)

          @message = message
        end

        def deconstruct
          [route.to_s, message]
        end

        def deconstruct_keys(_keys)
          {route: route.to_s, message: message}
        end

      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bbk-app-1.1.1.273627 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.1.273338 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.1.273312 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.1.273294 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.219406 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.216998 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.204569 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.200751 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.200186 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.199675 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.199604 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.199389 lib/bbk/app/dispatcher/result.rb
bbk-app-1.1.0.199383 lib/bbk/app/dispatcher/result.rb
bbk-app-1.0.0.152254 lib/bbk/app/dispatcher/result.rb