Class: ManageIQ::API::Common::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/manageiq/api/common/filter.rb

Defined Under Namespace

Classes: Error

Constant Summary collapse

INTEGER_COMPARISON_KEYWORDS =
["eq", "gt", "gte", "lt", "lte", "nil", "not_nil"].freeze
STRING_COMPARISON_KEYWORDS =
["contains", "contains_i", "eq", "eq_i", "starts_with", "starts_with_i", "ends_with", "ends_with_i", "nil", "not_nil"].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model, raw_filter, api_doc_definition) ⇒ Filter

Returns a new instance of Filter.



10
11
12
13
14
15
# File 'lib/manageiq/api/common/filter.rb', line 10

def initialize(model, raw_filter, api_doc_definition)
  self.query          = model
  @arel_table         = model.arel_table
  @raw_filter         = raw_filter
  @api_doc_definition = api_doc_definition
end

Instance Attribute Details

#api_doc_definitionObject (readonly)

Returns the value of attribute api_doc_definition.



8
9
10
# File 'lib/manageiq/api/common/filter.rb', line 8

def api_doc_definition
  @api_doc_definition
end

#applyObject (readonly)

Returns the value of attribute apply.



8
9
10
# File 'lib/manageiq/api/common/filter.rb', line 8

def apply
  @apply
end

#arel_tableObject (readonly)

Returns the value of attribute arel_table.



8
9
10
# File 'lib/manageiq/api/common/filter.rb', line 8

def arel_table
  @arel_table
end