Class: ActiveRecord::Refined::AST::JsonPath
- Includes:
- Arithmetics, JsonComparable, JsonDocument, JsonSteps, Predications
- Defined in:
- lib/active_record/refined/ast.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(operand, path, json_value: true) ⇒ JsonPath
constructor
A new instance of JsonPath.
- #json_value? ⇒ Boolean
- #to_arel(table, model) ⇒ Object
Methods included from JsonComparable
#between?, #in?, #not_between?, #not_in?, #~
Methods included from JsonSteps
#check_steps, #dollar_path, #dollar_step, #escape_step, #steps_array
Methods included from Arithmetics
#&, #*, #+, #-, #/, #<<, #>>, #^, #|, #~
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(operand, path, json_value: true) ⇒ JsonPath
Returns a new instance of JsonPath.
1011 1012 1013 1014 1015 |
# File 'lib/active_record/refined/ast.rb', line 1011 def initialize(operand, path, json_value: true) @operand = operand @path = check_steps(path, "dig") @json_value = json_value end |
Instance Attribute Details
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
1009 1010 1011 |
# File 'lib/active_record/refined/ast.rb', line 1009 def operand @operand end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
1009 1010 1011 |
# File 'lib/active_record/refined/ast.rb', line 1009 def path @path end |
Instance Method Details
#json_value? ⇒ Boolean
1017 1018 1019 |
# File 'lib/active_record/refined/ast.rb', line 1017 def json_value? @json_value end |