Class: ArelExtensions::Nodes::Union
- Inherits:
-
Arel::Nodes::Union
- Object
- Arel::Nodes::Union
- ArelExtensions::Nodes::Union
- Defined in:
- lib/arel_extensions/nodes/union.rb
Instance Method Summary collapse
- #+(other) ⇒ Object
- #as(other) ⇒ Object
-
#initialize(left, right) ⇒ Union
constructor
A new instance of Union.
- #union(other) ⇒ Object
Constructor Details
#initialize(left, right) ⇒ Union
Returns a new instance of Union.
5 6 7 |
# File 'lib/arel_extensions/nodes/union.rb', line 5 def initialize left,right return super(left,right) end |
Instance Method Details
#+(other) ⇒ Object
9 10 11 |
# File 'lib/arel_extensions/nodes/union.rb', line 9 def +(other) return ArelExtensions::Nodes::Union.new(self,other) end |
#as(other) ⇒ Object
17 18 19 |
# File 'lib/arel_extensions/nodes/union.rb', line 17 def as other Arel::Nodes::TableAlias.new Arel::Nodes::Grouping.new(self), Arel::Nodes::SqlLiteral.new(other.to_s) end |
#union(other) ⇒ Object
13 14 15 |
# File 'lib/arel_extensions/nodes/union.rb', line 13 def union(other) return ArelExtensions::Nodes::UnionAll.new(self,other) end |