Class: Brut::FrontEnd::Components::PageIdentifier
- Inherits:
-
Brut::FrontEnd::Component
- Object
- Phlex::HTML
- Brut::FrontEnd::Component
- Brut::FrontEnd::Components::PageIdentifier
- Defined in:
- lib/brut/front_end/components/page_identifier.rb
Overview
Renders a <meta>
tag that contains the name of the page. This is useful for end to end tests to assert that they are on a specific page before continuing with the test. It can eliminate a lot of confusion when a test fails.
Instance Method Summary collapse
-
#initialize(page_name) ⇒ PageIdentifier
constructor
A new instance of PageIdentifier.
-
#view_template ⇒ Object
Methods inherited from Brut::FrontEnd::Component
component_name, #component_name
Methods included from Brut::FrontEnd::Component::Helpers
#global_component, #inline_svg
Methods included from I18n::ForHTML
Methods included from I18n::BaseMethods
#l, #t, #t_direct, #this_field_value
Methods included from Brut::Framework::Errors
Constructor Details
#initialize(page_name) ⇒ PageIdentifier
Returns a new instance of PageIdentifier.
3 4 5 |
# File 'lib/brut/front_end/components/page_identifier.rb', line 3 def initialize(page_name) @page_name = page_name end |