Class: ArelExtensions::Nodes::JsonNode
- Defined in:
- lib/arel_extensions/nodes/json.rb
Constant Summary collapse
- RETURN_TYPE =
:json
Instance Attribute Summary collapse
-
#dict ⇒ Object
Returns the value of attribute dict.
Instance Method Summary collapse
- #get(key) ⇒ Object
- #group(as_array = true, orders = nil) ⇒ Object
- #hash ⇒ Object
- #merge(*expr) ⇒ Object
- #set(key, value) ⇒ Object
Methods inherited from Function
#!=, #==, #as, #convert_to_date_node, #convert_to_datetime_node, #convert_to_node, #convert_to_number, #convert_to_string_node, #expr, #left, #return_type, #right, #type_of_attribute
Methods included from Predications
#cast, #convert_to_node, #imatches, #in, #matches, #not_in, #when
Instance Attribute Details
#dict ⇒ Object
Returns the value of attribute dict.
6 7 8 |
# File 'lib/arel_extensions/nodes/json.rb', line 6 def dict @dict end |
Instance Method Details
#get(key) ⇒ Object
13 14 15 |
# File 'lib/arel_extensions/nodes/json.rb', line 13 def get key JsonGet.new(self,key) end |
#group(as_array = true, orders = nil) ⇒ Object
21 22 23 |
# File 'lib/arel_extensions/nodes/json.rb', line 21 def group as_array = true, orders= nil JsonGroup.new(self,as_array, orders) end |
#hash ⇒ Object
25 26 27 |
# File 'lib/arel_extensions/nodes/json.rb', line 25 def hash [@dict].hash end |