Class: SearchFuAttribute
- Inherits:
-
Object
- Object
- SearchFuAttribute
- Defined in:
- lib/search_fu_attribute.rb
Instance Attribute Summary collapse
-
#column_name ⇒ Object
Returns the value of attribute column_name.
-
#query ⇒ Object
Returns the value of attribute query.
-
#view_name ⇒ Object
Returns the value of attribute view_name.
Instance Method Summary collapse
-
#initialize(name, view_name = nil, query = nil) ⇒ SearchFuAttribute
constructor
A new instance of SearchFuAttribute.
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_name ⇒ Object
Returns the value of attribute column_name.
4 5 6 |
# File 'lib/search_fu_attribute.rb', line 4 def column_name @column_name end |
#query ⇒ Object
Returns the value of attribute query.
4 5 6 |
# File 'lib/search_fu_attribute.rb', line 4 def query @query end |
#view_name ⇒ Object
Returns the value of attribute view_name.
4 5 6 |
# File 'lib/search_fu_attribute.rb', line 4 def view_name @view_name end |