Method: Howitzer::Web::Page.path

Defined in:
lib/howitzer/web/page.rb

.path(value) ⇒ Object

DSL to specify an relative path pattern for the page opening

Examples:

class ArticlePage < Howitzer::Web::Page
  url '/articles/:id'
end
ArticlePage.open(id: 10)

Parameters:

  • value (String)

    a path pattern, for details please see Addressable gem

See Also:



127
128
129
130
# File 'lib/howitzer/web/page.rb', line 127

def path(value)
  define_singleton_method(:path_value) { value.to_s }
  private_class_method :path_value
end