Class: Staticky::Resources::Plugins::Phlex::ViewContext

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/staticky/resources/plugins/phlex.rb

Instance Method Summary collapse

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_pathObject



17
18
19
# File 'lib/staticky/resources/plugins/phlex.rb', line 17

def current_path
  @resource.url
end

#root?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/staticky/resources/plugins/phlex.rb', line 13

def root?
  @resource.root?
end