Class: PaginationSearch::AttributeSet::Attribute

Inherits:
Struct
  • Object
show all
Defined in:
lib/pagination_search/attribute_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#arel_tableObject

Returns the value of attribute arel_table

Returns:

  • (Object)

    the current value of arel_table



3
4
5
# File 'lib/pagination_search/attribute_set.rb', line 3

def arel_table
  @arel_table
end

#association_nameObject

Returns the value of attribute association_name

Returns:

  • (Object)

    the current value of association_name



3
4
5
# File 'lib/pagination_search/attribute_set.rb', line 3

def association_name
  @association_name
end

#column_nameObject

Returns the value of attribute column_name

Returns:

  • (Object)

    the current value of column_name



3
4
5
# File 'lib/pagination_search/attribute_set.rb', line 3

def column_name
  @column_name
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/pagination_search/attribute_set.rb', line 3

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



3
4
5
# File 'lib/pagination_search/attribute_set.rb', line 3

def type
  @type
end

Instance Method Details

#columnObject



4
5
6
# File 'lib/pagination_search/attribute_set.rb', line 4

def column
  arel_table[column_name]
end

#matching_condition(value) ⇒ Object



8
9
10
# File 'lib/pagination_search/attribute_set.rb', line 8

def matching_condition(value)
  column.matches("%#{value}%")
end