Class: ActiveRecord::Refined::AST::Value
- Includes:
- Arithmetics, Predications
- Defined in:
- lib/active_record/refined/ast.rb
Overview
A literal standing where an expression would: select { value(0).as(:depth) }.
Values reach the SQL quoted wherever they appear as an operand, but a
bare Ruby literal at the top of a select list is refused as saying
nothing. value is the spelling that quotes it there, and it carries
the predications with it, so a literal can be compared and combined
like anything else.
Instance Method Summary collapse
-
#initialize(value) ⇒ Value
constructor
A new instance of Value.
Methods included from Arithmetics
#&, #*, #+, #-, #/, #<<, #>>, #^, #bitwise_and, #bitwise_not, #bitwise_or, #bitwise_xor, #|, #~
Methods included from Predications
#!=, #!~, #<, #<=, #==, #=~, #>, #>=, #between?, #bury, #casecmp?, #contains?, #dig, #dig_text, #distinct_from?, #end_with?, #except, #false?, #ilike?, #in?, #include?, #intersect?, #key?, #keys, #like?, #member?, #not_between?, #not_distinct_from?, #not_false?, #not_ilike?, #not_in?, #not_like?, #not_null?, #not_true?, #null?, #start_with?, #subset?, #superset?, #true?, #when
Methods inherited from Node
Constructor Details
#initialize(value) ⇒ Value
Returns a new instance of Value.
797 798 799 |
# File 'lib/active_record/refined/ast.rb', line 797 def initialize(value) @value = value end |