Class: GovukTechDocs::Pages

Inherits:
Object
  • Object
show all
Includes:
PathHelpers
Defined in:
lib/govuk_tech_docs/pages.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PathHelpers

#get_path_to_resource, #path_to_site_root

Constructor Details

#initialize(sitemap, config, current_page) ⇒ Pages

Returns a new instance of Pages.



6
7
8
9
10
# File 'lib/govuk_tech_docs/pages.rb', line 6

def initialize(sitemap, config, current_page)
  @sitemap = sitemap
  @config = config
  @current_page = current_page
end

Instance Attribute Details

#sitemapObject (readonly)

Returns the value of attribute sitemap.



4
5
6
# File 'lib/govuk_tech_docs/pages.rb', line 4

def sitemap
  @sitemap
end

Instance Method Details

#to_json(*_args) ⇒ Object



12
13
14
# File 'lib/govuk_tech_docs/pages.rb', line 12

def to_json(*_args)
  as_json.to_json
end