Class: Refinery::Pages::FinderByPath

Inherits:
Object
  • Object
show all
Defined in:
lib/refinery/pages/finder.rb

Direct Known Subclasses

FinderByScopedPath, FinderByUnscopedPath

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ FinderByPath

Returns a new instance of FinderByPath.



94
95
96
# File 'lib/refinery/pages/finder.rb', line 94

def initialize(path)
  @path = path
end

Instance Method Details

#findObject



98
99
100
101
102
103
104
# File 'lib/refinery/pages/finder.rb', line 98

def find
  if slugs_scoped_by_parent?
    FinderByScopedPath.new(path).find
  else
    FinderByUnscopedPath.new(path).find
  end
end