Class: ArelExtensions::Nodes::Json
Constant Summary
Constants inherited from JsonNode
ArelExtensions::Nodes::JsonNode::RETURN_TYPE
Constants inherited from Function
Function::MBSTRING, Function::RETURN_TYPE
Instance Attribute Summary
Attributes inherited from JsonNode
Instance Method Summary collapse
-
#initialize(*expr) ⇒ Json
constructor
A new instance of Json.
Methods inherited from JsonNode
#convert_to_json_node, #get, #group, #hash, #merge, #set, #type_of_node
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
Constructor Details
#initialize(*expr) ⇒ Json
Returns a new instance of Json.
69 70 71 72 73 74 75 76 77 |
# File 'lib/arel_extensions/nodes/json.rb', line 69 def initialize *expr @dict = if expr.length == 1 convert_to_json_node(expr.first) else expr.map{|e| convert_to_json_node(e) } end super end |