Class: Seory::Condition::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/seory/condition/path.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


9
10
11
# File 'lib/seory/condition/path.rb', line 9

def match?(controller)
  controller.request.fullpath.start_with?(@path)
end