Class: ArelExtensions::Nodes::JsonSet

Inherits:
JsonNode show all
Defined in:
lib/arel_extensions/nodes/json.rb

Constant Summary

Constants inherited from JsonNode

ArelExtensions::Nodes::JsonNode::RETURN_TYPE

Constants inherited from Function

Function::MBSTRING, Function::RETURN_TYPE

Instance Attribute Summary collapse

Attributes inherited from JsonNode

#dict

Instance Method Summary collapse

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(json, key, value) ⇒ JsonSet

Returns a new instance of JsonSet.



109
110
111
112
113
# File 'lib/arel_extensions/nodes/json.rb', line 109

def initialize json, key, value
  @dict = json
  @key = convert_to_node(key)
  @value = Json.new(value)
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



107
108
109
# File 'lib/arel_extensions/nodes/json.rb', line 107

def key
  @key
end

#valueObject

Returns the value of attribute value.



107
108
109
# File 'lib/arel_extensions/nodes/json.rb', line 107

def value
  @value
end