Class: Alchemy::PageFinder
- Inherits:
-
Object
- Object
- Alchemy::PageFinder
- Defined in:
- app/services/alchemy/page_finder.rb
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
-
#urlname ⇒ Object
readonly
Returns the value of attribute urlname.
Instance Method Summary collapse
- #call ⇒ PageFinder::Result?
-
#initialize(urlname) ⇒ PageFinder
constructor
A new instance of PageFinder.
Constructor Details
#initialize(urlname) ⇒ PageFinder
Returns a new instance of PageFinder.
9 10 11 |
# File 'app/services/alchemy/page_finder.rb', line 9 def initialize(urlname) @urlname = urlname end |
Instance Attribute Details
#urlname ⇒ Object (readonly)
Returns the value of attribute urlname.
5 6 7 |
# File 'app/services/alchemy/page_finder.rb', line 5 def urlname @urlname end |
Instance Method Details
#call ⇒ PageFinder::Result?
14 15 16 17 18 |
# File 'app/services/alchemy/page_finder.rb', line 14 def call return if urlname.blank? find_by_urlname || find_by_wildcard_url end |