Sha256: 6f4af8b2b3a8d9cb48e0cc1b55f08309e89e98ca754be519df01b4a25ce32ced

Contents?: true

Size: 661 Bytes

Versions: 13

Compression:

Stored size: 661 Bytes

Contents

module Hyperloop
  class Router
    module Mixin
      class << self
        def included(base)
          base.include(Hyperloop::Component::Mixin)
          base.include(HyperRouter::ComponentMethods)

          base.class_eval do
            param :match, default: nil
            param :location, default: nil
            param :history, default: nil

            define_method(:match) do
              params.match
            end

            define_method(:location) do
              params.location
            end

            define_method(:history) do
              params.history
            end
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hyper-router-0.99.6 lib/hyperloop/router/mixin.rb
hyper-router-0.99.5 lib/hyperloop/router/mixin.rb
hyper-router-0.99.4 lib/hyperloop/router/mixin.rb
hyper-router-0.99.3 lib/hyperloop/router/mixin.rb
hyper-router-0.99.2 lib/hyperloop/router/mixin.rb
hyper-router-0.99.1 lib/hyperloop/router/mixin.rb
hyper-router-4.2.6.lap27 lib/hyperloop/router/mixin.rb
hyper-router-4.2.6.lap26 lib/hyperloop/router/mixin.rb
hyper-router-4.2.6.lap25 lib/hyperloop/router/mixin.rb
hyper-router-4.2.6.lap24 lib/hyperloop/router/mixin.rb
hyper-router-4.2.6.lap23 lib/hyperloop/router/mixin.rb
hyper-router-4.2.6.lap22 lib/hyperloop/router/mixin.rb
hyper-router-4.1.1 lib/hyperloop/router/mixin.rb