Sha256: c3f083c535695618a3750cff1016ed4f29248a7d9350632eb335cecb2c8b227c

Contents?: true

Size: 328 Bytes

Versions: 7

Compression:

Stored size: 328 Bytes

Contents

Toycol::Protocol.define(:ruby) do |message|
  using Module.new {
    refine String do
      def get
        Toycol::Protocol.request.path do |message|
          /['"](?<path>.+)['"]/.match(message)[:path]
        end

        Toycol::Protocol.request.http_method { |_| "GET" }
      end
    end
  }

  instance_eval message
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
toycol-1.0.0 examples/unsafe_ruby/Protocolfile.unsafe_ruby
toycol-0.3.1 examples/unsafe_ruby/Protocolfile.unsafe_ruby
toycol-0.3.0 examples/unsafe_ruby/Protocolfile.unsafe_ruby
toycol-0.2.2 examples/unsafe_ruby/Protocolfile.unsafe_ruby
toycol-0.2.1 examples/unsafe_ruby/Protocolfile.unsafe_ruby
toycol-0.2.0 examples/unsafe_ruby/Protocolfile.unsafe_ruby
toycol-0.1.0 examples/unsafe_ruby/Protocolfile.unsafe_ruby