Sha256: 7e796b76f25483d00e92399f9ab1971e919cf4224a8ed1574cf16c030f491fd9

Contents?: true

Size: 255 Bytes

Versions: 5

Compression:

Stored size: 255 Bytes

Contents

class SexpPath::Matcher::Block < SexpPath::Matcher::Base
  attr_reader :exp
  def initialize &block
    @exp = block
  end

  def satisfy?(o, data={})
    return nil unless @exp[o]
  
    capture_match o, data
  end

  def inspect
    "<custom>"
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
adamsanderson-sexp_path-0.4.0 lib/sexp_path/matcher/block.rb
sexp_path-0.5.2 lib/sexp_path/matcher/block.rb
sexp_path-0.5.1 lib/sexp_path/matcher/block.rb
sexp_path-0.5.0 lib/sexp_path/matcher/block.rb
sexp_path-0.4.0 lib/sexp_path/matcher/block.rb