Class: Prequel::Expressions::AliasedExpression

Inherits:
Object
  • Object
show all
Defined in:
lib/prequel/expressions/aliased_expression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression, alias_name) ⇒ AliasedExpression

Returns a new instance of AliasedExpression.



6
7
8
# File 'lib/prequel/expressions/aliased_expression.rb', line 6

def initialize(expression, alias_name)
  @expression, @alias_name = expression, alias_name
end

Instance Attribute Details

#alias_nameObject (readonly)

Returns the value of attribute alias_name.



4
5
6
# File 'lib/prequel/expressions/aliased_expression.rb', line 4

def alias_name
  @alias_name
end

#expressionObject (readonly)

Returns the value of attribute expression.



4
5
6
# File 'lib/prequel/expressions/aliased_expression.rb', line 4

def expression
  @expression
end

Instance Method Details

#resolve_in_relations(relations) ⇒ Object



10
11
12
# File 'lib/prequel/expressions/aliased_expression.rb', line 10

def resolve_in_relations(relations)
  AliasedExpression.new(expression.resolve_in_relations(relations), alias_name)
end