Class: Seory::Condition::Path
- Inherits:
-
Object
- Object
- Seory::Condition::Path
- Defined in:
- lib/seory/condition/path.rb
Instance Method Summary collapse
-
#initialize(path, exact_match = false) ⇒ Path
constructor
A new instance of Path.
- #match?(controller) ⇒ Boolean
Constructor Details
#initialize(path, exact_match = false) ⇒ Path
Returns a new instance of Path.
4 5 6 7 |
# File 'lib/seory/condition/path.rb', line 4 def initialize(path, exact_match = false) @path = path @exact_match = exact_match end |
Instance Method Details
#match?(controller) ⇒ Boolean
9 10 11 |
# File 'lib/seory/condition/path.rb', line 9 def match?(controller) controller.request.fullpath.start_with?(@path) end |