Class: DataMapper::Query::Conditions::NullOperation

Inherits:
AbstractOperation show all
Defined in:
lib/dm-core/query/conditions/operation.rb

Overview

class NotOperation

Instance Attribute Summary

Attributes inherited from AbstractOperation

#operands

Instance Method Summary collapse

Methods inherited from AbstractOperation

#<<, descendants, #each, inherited, #slug, slug, #sorted_operands

Methods included from Equalizer

#equalize

Instance Method Details

#inspectString

Inspecting the operation should return the same as nil

Returns:

  • (String)

    return the string ‘nil’



241
242
243
# File 'lib/dm-core/query/conditions/operation.rb', line 241

def inspect
  'nil'
end

#matches?(record) ⇒ true

Match the record

Parameters:

  • record (Resource)

    the resource to match

Returns:

  • (true)

    every record matches



211
212
213
# File 'lib/dm-core/query/conditions/operation.rb', line 211

def matches?(record)
  true
end

#nil?true

Treat the operation the same as nil

Returns:

  • (true)

    should be treated as nil



231
232
233
# File 'lib/dm-core/query/conditions/operation.rb', line 231

def nil?
  true
end

#valid?true

Test validity of the operation

Returns:

  • (true)

    always valid



221
222
223
# File 'lib/dm-core/query/conditions/operation.rb', line 221

def valid?
  true
end