Module: Rango::StrategyMixin
Public Visibility
Public Class Method Details
find
public
find(*args)
[View source]
13 14 15 |
# File 'lib/rango/mixins/strategy.rb', line 13 def find(*args) self.strategies.find { |strategy| strategy.match?(*args) } end |
register
public
register
[View source]
9 10 11 |
# File 'lib/rango/mixins/strategy.rb', line 9 def register self.strategies.push(self) end |
Public Instance Method Details
match?
public
match?(*args)
[View source]
18 19 20 |
# File 'lib/rango/mixins/strategy.rb', line 18 def match?(*args) raise "This method must be redefined in subclasses" end |
run
public
run(*args)
[View source]
22 23 24 |
# File 'lib/rango/mixins/strategy.rb', line 22 def run(*args) raise "This method must be redefined in subclasses" end |