Class: ArQueryMatchers::Queries::FieldName

Inherits:
Object
  • Object
show all
Defined in:
lib/ar_query_matchers/queries/field_name.rb

Overview

An instance of this class is one of the values that could be returned from the QueryFilter#filter_map. it accepts a name of an ActiveRecord model, for example: ‘Company’.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model_name, model_value) ⇒ FieldName

Returns a new instance of FieldName.



10
11
12
13
# File 'lib/ar_query_matchers/queries/field_name.rb', line 10

def initialize(model_name, model_value)
  @model_name = model_name
  @model_value = model_value
end

Instance Attribute Details

#model_nameObject (readonly)

Returns the value of attribute model_name.



8
9
10
# File 'lib/ar_query_matchers/queries/field_name.rb', line 8

def model_name
  @model_name
end

#model_valueObject (readonly)

Returns the value of attribute model_value.



8
9
10
# File 'lib/ar_query_matchers/queries/field_name.rb', line 8

def model_value
  @model_value
end