Sha256: 74bf6978cf02553279a77d013c92d43f45b6152fe3e6fd04a614642ed57f3a29

Contents?: true

Size: 654 Bytes

Versions: 37

Compression:

Stored size: 654 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::RouteBuilder.current.chain(source, :element_type => :mixed, :graph => based_on.graph, :extensions => based_on.extensions, :info => based_on.info)
    else
      graph = opts[:graph] if opts[:graph]
      Pacer::RouteBuilder.current.chain(source, :element_type => (opts[:element_type] || :object), :graph => graph, :extensions => opts[:extensions], :info => opts[:info])
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
pacer-2.0.24-java lib/pacer/support/proc.rb
pacer-2.0.22-java lib/pacer/support/proc.rb
pacer-2.0.20-java lib/pacer/support/proc.rb
pacer-2.0.19-java lib/pacer/support/proc.rb
pacer-2.0.18-java lib/pacer/support/proc.rb
pacer-2.0.17-java lib/pacer/support/proc.rb
pacer-2.0.16-java lib/pacer/support/proc.rb
pacer-2.0.15-java lib/pacer/support/proc.rb
pacer-2.0.14-java lib/pacer/support/proc.rb
pacer-2.0.13-java lib/pacer/support/proc.rb
pacer-2.0.12-java lib/pacer/support/proc.rb
pacer-2.0.10-java lib/pacer/support/proc.rb
pacer-2.0.10.pre-java lib/pacer/support/proc.rb
pacer-2.0.8-java lib/pacer/support/proc.rb
pacer-2.0.6-java lib/pacer/support/proc.rb
pacer-2.0.4.pre-java lib/pacer/support/proc.rb
pacer-2.0.0.pre-java lib/pacer/support/proc.rb
pacer-1.6.0-java lib/pacer/support/proc.rb
pacer-1.5.4-java lib/pacer/support/proc.rb
pacer-1.5.3-java lib/pacer/support/proc.rb