Sha256: 89137b20cdde0b30b321e4df2f66414c33ffdc27acbf46810f869df8efded46a

Contents?: true

Size: 381 Bytes

Versions: 2

Compression:

Stored size: 381 Bytes

Contents

module React
  class Router
    class DSL
      class Route
        def on(hook, &block)
          @opts["on_#{hook}"] = block
          self
        end

        def mounts(name = nil, &block)
          if name
            @components ||= {}
            @components[name] = block
          else
            @component = block
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hyper-router-2.4.1 lib/react/router/dsl/route/hooks.rb
hyper-router-2.4.0 lib/react/router/dsl/route/hooks.rb