Class: SeekParty::SeekPartyAttribute

Inherits:
Object
  • Object
show all
Defined in:
lib/seek_party/seek_party_attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(inspected_class, white_list, black_list) ⇒ SeekPartyAttribute

Returns a new instance of SeekPartyAttribute.



7
8
9
10
11
# File 'lib/seek_party/seek_party_attribute.rb', line 7

def initialize(inspected_class, white_list, black_list)
  @inspected_class = inspected_class
  @white_list = white_list
  @black_list = black_list
end

Instance Attribute Details

#black_listObject

Returns the value of attribute black_list.



3
4
5
# File 'lib/seek_party/seek_party_attribute.rb', line 3

def black_list
  @black_list
end

#inspected_classObject

Returns the value of attribute inspected_class.



3
4
5
# File 'lib/seek_party/seek_party_attribute.rb', line 3

def inspected_class
  @inspected_class
end

#white_listObject

Returns the value of attribute white_list.



3
4
5
# File 'lib/seek_party/seek_party_attribute.rb', line 3

def white_list
  @white_list
end

Instance Method Details

#discover_attributesObject

Compare attributes to params passed If only search is present, query against all params If both search and other attributes match against the params hash, query against them too.



17
18
19
# File 'lib/seek_party/seek_party_attribute.rb', line 17

def discover_attributes
  check_attributes @inspected_class.new
end