Sha256: bcd164d8fa7cf5f318f996d63fadbfb8da3959c01e596aea0f07ff4c34097b05
Contents?: true
Size: 1.01 KB
Versions: 16
Compression:
Stored size: 1.01 KB
Contents
module FattureInCloud_Ruby_Sdk # The Conjunction class is used to build a conjunction of two expressions. class Disjunction < Expression attr_accessor :left, :right # Initializes a new instance of the Conjunction class. # @param [Expression] left The left expression. # @param [Expression] right The right expression. def initialize(left, right) @left = left @right = right end # Builds the query from the conjunction. # @return [String] The query. def build_query "(#{@left.build_query} or #{@right.build_query})" end # Builds the query from the conjunction. # @return [String] The query. def to_s build_query end # Overrides the == operator. # @param [Conjunction] other The conjunction to compare. # @return [Boolean] True if the conjunctions are equal, false otherwise. def == (other) if other.instance_of? Disjunction @left == other.left && @right == other.right else false end end end end
Version data entries
16 entries across 16 versions & 1 rubygems