Class: Www::SupportSpecificationsComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/www/support_specifications_component.rb

Overview

ViewComponent: renders the support specifications block.

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags

Constructor Details

#initialize(specifications_grouped:) ⇒ SupportSpecificationsComponent

Returns a new instance of SupportSpecificationsComponent.

Parameters:

  • specifications_grouped (Array, Hash)

    specifications grouped for display



6
7
8
9
# File 'app/components/www/support_specifications_component.rb', line 6

def initialize(specifications_grouped:)
  super()
  @specifications_grouped = specifications_grouped
end

Instance Method Details

#render?Boolean

Whether the component should render.

Returns:

  • (Boolean)

    true when grouped specifications are present



13
14
15
# File 'app/components/www/support_specifications_component.rb', line 13

def render?
  specifications_grouped.present?
end