Class: Staticky::Resources::Plugins::Phlex::ViewContext
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Staticky::Resources::Plugins::Phlex::ViewContext
- Defined in:
- lib/staticky/resources/plugins/phlex.rb
Instance Method Summary collapse
- #current_path ⇒ Object
-
#initialize(resource) ⇒ ViewContext
constructor
A new instance of ViewContext.
- #root? ⇒ Boolean
Constructor Details
#initialize(resource) ⇒ ViewContext
Returns a new instance of ViewContext.
8 9 10 11 |
# File 'lib/staticky/resources/plugins/phlex.rb', line 8 def initialize(resource) super @resource = resource end |
Instance Method Details
#current_path ⇒ Object
17 18 19 |
# File 'lib/staticky/resources/plugins/phlex.rb', line 17 def current_path @resource.url end |
#root? ⇒ Boolean
13 14 15 |
# File 'lib/staticky/resources/plugins/phlex.rb', line 13 def root? @resource.root? end |