lib/piglet/field/call_expression.rb in piglet-0.2.5 vs lib/piglet/field/call_expression.rb in piglet-0.3.0

- old
+ new

@@ -7,17 +7,22 @@ def initialize(function_name, inner_expression, options=nil) options ||= {} @function_name, @inner_expression = function_name, inner_expression @type = options[:type] || inner_expression.type + @predecessors = [inner_expression] end def simple? false end - def to_s - "#{@function_name}(#{@inner_expression})" + def to_s(inner=false) + if inner + "#{@function_name}(#{@inner_expression.field_alias})" + else + "#{@function_name}(#{@inner_expression})" + end end end end end \ No newline at end of file