Class: Prequel::Expressions::AliasedExpression
- Inherits:
-
Object
- Object
- Prequel::Expressions::AliasedExpression
- Defined in:
- lib/prequel/expressions/aliased_expression.rb
Instance Attribute Summary collapse
-
#alias_name ⇒ Object
readonly
Returns the value of attribute alias_name.
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Instance Method Summary collapse
-
#initialize(expression, alias_name) ⇒ AliasedExpression
constructor
A new instance of AliasedExpression.
- #resolve_in_relations(relations) ⇒ Object
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_name ⇒ Object (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 |
#expression ⇒ Object (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 |