Class: FilterDecrufter::Hit
- Inherits:
-
Object
- Object
- FilterDecrufter::Hit
- Defined in:
- lib/filter_decrufter/checker.rb
Instance Attribute Summary collapse
-
#controller_class ⇒ Object
Returns the value of attribute controller_class.
-
#filter_name ⇒ Object
Returns the value of attribute filter_name.
-
#filter_type ⇒ Object
Returns the value of attribute filter_type.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #actions_include?(action_name) ⇒ Boolean
-
#initialize(controller_class, filter_name, options, filter_type) ⇒ Hit
constructor
A new instance of Hit.
- #populated_options_for(name) ⇒ Object
Constructor Details
#initialize(controller_class, filter_name, options, filter_type) ⇒ Hit
Returns a new instance of Hit.
7 8 9 10 11 12 |
# File 'lib/filter_decrufter/checker.rb', line 7 def initialize(controller_class, filter_name, , filter_type) @controller_class = controller_class @filter_name = filter_name @options = @filter_type = filter_type end |
Instance Attribute Details
#controller_class ⇒ Object
Returns the value of attribute controller_class.
5 6 7 |
# File 'lib/filter_decrufter/checker.rb', line 5 def controller_class @controller_class end |
#filter_name ⇒ Object
Returns the value of attribute filter_name.
5 6 7 |
# File 'lib/filter_decrufter/checker.rb', line 5 def filter_name @filter_name end |
#filter_type ⇒ Object
Returns the value of attribute filter_type.
5 6 7 |
# File 'lib/filter_decrufter/checker.rb', line 5 def filter_type @filter_type end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/filter_decrufter/checker.rb', line 5 def @options end |
Instance Method Details
#actions_include?(action_name) ⇒ Boolean
14 15 16 |
# File 'lib/filter_decrufter/checker.rb', line 14 def actions_include?(action_name) action_methods.include?(action_name) end |
#populated_options_for(name) ⇒ Object
18 19 20 |
# File 'lib/filter_decrufter/checker.rb', line 18 def (name) .select {|opt_name,opt_value| opt_name == name && !opt_value.empty? } end |