Method: OodAppkit::Url#initialize

Defined in:
lib/ood_appkit/url.rb

#initialize(title: '', base_url: '/', template: '{/url*}/') ⇒ Url

Returns a new instance of Url.

Parameters:

  • title (#to_s) (defaults to: '')

    the title of the URL

  • base_url (#to_s) (defaults to: '/')

    the base URL used to access this app

  • template (#to_s) (defaults to: '{/url*}/')

    the template used to generate URLs for this app

See Also:


14
15
16
17
18
# File 'lib/ood_appkit/url.rb', line 14

def initialize(title: '', base_url: '/', template: '{/url*}/')
  @title = title.to_s
  @template = Addressable::Template.new template.to_s
  @base_url = parse_url_segments(base_url.to_s)
end