Class: FluentQuery::Compilers::Result

Inherits:
Array
  • Object
show all
Defined in:
lib/fluent-query/compilers/result.rb

Overview

Query compiler result. Aka compiled string.

Instance Method Summary collapse

Instance Method Details

#complete(*args) ⇒ Object

Completes the compiled string to final one.



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fluent-query/compilers/result.rb', line 16

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