Sha256: 41f2cfd23c552997021a4b0b88a031ffb5ee34bd374c85af47bcd1b726bb9a81
Contents?: true
Size: 807 Bytes
Versions: 4
Compression:
Stored size: 807 Bytes
Contents
require 'railroader/processors/lib/processor_helper' require 'railroader/processors/lib/safe_call_helper' require 'railroader/util' class Railroader::BasicProcessor < Railroader::SexpProcessor include Railroader::ProcessorHelper include Railroader::SafeCallHelper include Railroader::Util def initialize tracker super() @tracker = tracker @current_template = @current_module = @current_class = @current_method = nil end def process_default exp process_all exp end def process_if exp condition = exp.condition process condition if true? condition process exp.then_clause elsif false? condition process exp.else_clause else [exp.then_clause, exp.else_clause].compact.map do |e| process e end end exp end end
Version data entries
4 entries across 4 versions & 1 rubygems