Sha256: 1ada7d31c3e75fe980d5dc0ca0cef142d006b085e84d52b44234f6009fc5c041
Contents?: true
Size: 420 Bytes
Versions: 15
Compression:
Stored size: 420 Bytes
Contents
module Furnace::AST class MatcherSpecial attr_reader :type, :param def initialize(type, param=nil) @type, @param = type, param end class << self def define(type) lambda { |*args| new(type, args) } end def kind(type) @kind_lambdas ||= {} @kind_lambdas[type] ||= lambda { |m| m.is_a?(MatcherSpecial) && m.type == type } end end end end
Version data entries
15 entries across 15 versions & 1 rubygems