Sha256: 734822f328c5497ad57f3e79d33e2b473bec156c048f7cc033f5d72944713046

Contents?: true

Size: 430 Bytes

Versions: 4

Compression:

Stored size: 430 Bytes

Contents

module Piglet
  module Field
    class SuffixExpression # :nodoc:
      include Field
    
      def initialize(operator, expression, options=nil)
        options ||= {}
        @operator, @expression = operator, expression
        @type = options[:type] || expression.type
      end
    
      def simple?
        false
      end
    
      def to_s
        "#{parenthesise(@expression)} #{@operator}"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
piglet-0.2.4 lib/piglet/field/suffix_expression.rb
piglet-0.2.3 lib/piglet/field/suffix_expression.rb
piglet-0.2.2 lib/piglet/field/suffix_expression.rb
piglet-0.2.0 lib/piglet/field/suffix_expression.rb