Class: GovukComponent::Footer

Inherits:
Base
  • Object
show all
Includes:
ViewComponent::Slotable
Defined in:
app/components/govuk_component/footer.rb

Instance Attribute Summary collapse

Attributes included from Traits::CustomHtmlAttributes

#html_attributes

Instance Method Summary collapse

Methods inherited from Base

wrap_slot

Methods included from Traits::CustomClasses

#classes

Constructor Details

#initialize(meta_items: {}, meta_items_title: "Support links", meta_licence: nil, classes: [], html_attributes: {}, copyright_text: default_copright_text, copyright_url: default_copyright_url) ⇒ Footer

Returns a new instance of Footer.



12
13
14
15
16
17
18
19
# File 'app/components/govuk_component/footer.rb', line 12

def initialize(meta_items: {}, meta_items_title: "Support links", meta_licence: nil, classes: [], html_attributes: {}, copyright_text: default_copright_text, copyright_url: default_copyright_url)
  super(classes: classes, html_attributes: html_attributes)

  @meta_items       = build_meta_links(meta_items)
  @meta_items_title = meta_items_title
  @meta_licence     = meta_licence
  @copyright        = build_copyright(copyright_text, copyright_url)
end

Instance Attribute Details

Returns the value of attribute copyright.



10
11
12
# File 'app/components/govuk_component/footer.rb', line 10

def copyright
  @copyright
end

#meta_itemsObject

Returns the value of attribute meta_items.



10
11
12
# File 'app/components/govuk_component/footer.rb', line 10

def meta_items
  @meta_items
end

#meta_items_titleObject

Returns the value of attribute meta_items_title.



10
11
12
# File 'app/components/govuk_component/footer.rb', line 10

def meta_items_title
  @meta_items_title
end

#meta_licenceObject

Returns the value of attribute meta_licence.



10
11
12
# File 'app/components/govuk_component/footer.rb', line 10

def meta_licence
  @meta_licence
end