Class: Mobility::Plugins::Arel::Nodes::JsonbContainer

Inherits:
Jsonb
  • Object
show all
Defined in:
lib/mobility/plugins/arel/nodes/pg_ops.rb

Instance Method Summary collapse

Methods inherited from Jsonb

#to_dash_arrow, #to_question

Constructor Details

#initialize(column, locale, attr) ⇒ JsonbContainer

Returns a new instance of JsonbContainer.



84
85
86
87
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 84

def initialize column, locale, attr
  @column, @locale = column, locale
  super(JsonbDashArrow.new(column, locale), attr)
end

Instance Method Details

#eq(other) ⇒ Object



89
90
91
# File 'lib/mobility/plugins/arel/nodes/pg_ops.rb', line 89

def eq other
  other.nil? ? super.or(JsonbQuestion.new(@column, @locale).not) : super
end