Class: SearchFuAttribute

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, view_name = nil, query = nil) ⇒ SearchFuAttribute

Returns a new instance of SearchFuAttribute.



6
7
8
9
10
11
12
13
14
# File 'lib/search_fu_attribute.rb', line 6

def initialize name, view_name=nil, query=nil
  @column_name = name
  @view_name = humanzie_symbol name
  @query = query if query
  @query = view_name if view_name.respond_to? :call
  if view_name and !view_name.respond_to? :call
    @view_name = humanzie_symbol view_name
  end
end

Instance Attribute Details

#column_nameObject

Returns the value of attribute column_name.



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

def column_name
  @column_name
end

#queryObject

Returns the value of attribute query.



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

def query
  @query
end

#view_nameObject

Returns the value of attribute view_name.



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

def view_name
  @view_name
end