Sha256: 4616b5373ae7213860d620fa15491453d2aeaa138b4671ade3375f67f1a078e4

Contents?: true

Size: 642 Bytes

Versions: 1

Compression:

Stored size: 642 Bytes

Contents

class Proc
  def to_route(opts = {})
    based_on = opts[:based_on]
    if opts[:unwrap] or based_on and based_on.extensions and based_on.graph
      source = proc { self.call.map { |e| e.element } }
    else
      source = self
    end
    if based_on
      Pacer::Route.new(:source => source, :element_type => :mixed, :graph => based_on.graph, :extensions => based_on.extensions, :info => based_on.info)
    else
      graph = opts[:graph] if opts[:graph]
      Pacer::Route.new(:source => source, :element_type => (opts[:element_type] || :object), :graph => graph, :extensions => opts[:extensions], :info => opts[:info])
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pacer-0.9.1.1-java lib/pacer/support/proc.rb