Class: Merit::TargetFinder
- Inherits:
-
Struct
- Object
- Struct
- Merit::TargetFinder
- Defined in:
- lib/merit/target_finder.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#rule ⇒ Object
Returns the value of attribute rule.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
2 3 4 |
# File 'lib/merit/target_finder.rb', line 2 def action @action end |
#rule ⇒ Object
Returns the value of attribute rule
2 3 4 |
# File 'lib/merit/target_finder.rb', line 2 def rule @rule end |
Class Method Details
.find(*args) ⇒ Object
3 4 5 |
# File 'lib/merit/target_finder.rb', line 3 def self.find(*args) new(*args).find end |
Instance Method Details
#find ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/merit/target_finder.rb', line 7 def find target = case rule.to when :itself then base_target when :action_user then action_user else other_target end Array.wrap(target) end |