Sha256: 41c2bec831e1ac5439ef2dd87aca18b949bacde19ac0fcae7582a52d500e7cb0

Contents?: true

Size: 743 Bytes

Versions: 4

Compression:

Stored size: 743 Bytes

Contents

# encoding: utf-8

module FluentQuery
    module Compilers
    
         ##
         # Query compiler result. Aka compiled string.
         #
         
         class Result < ::Array
         
            ##
            # Completes the compiled string to final one.
            #
            
            def complete(*args)
                result = ""
                
                self.each do |v|
                    if v.kind_of? Proc
                        result << v.call(args.shift)
                    else
                        result << v.to_s
                    end
                end
                
                return result
            end
            
         end
     end
 end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fluent-query-0.9.5 lib/fluent-query/compilers/result.rb
fluent-query-0.9.3 lib/fluent-query/compilers/result.rb
fluent-query-0.9.1 lib/fluent-query/compilers/result.rb
fluent-query-0.9.0 lib/fluent-query/compilers/result.rb