Class: Essence::CardComponent

Inherits:
ApplicationComponent show all
Defined in:
app/components/essence/card_component.rb

Defined Under Namespace

Classes: RibbonComponent

Constant Summary

Constants included from FetchOrFallbackHelper

FetchOrFallbackHelper::InvalidValueError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationComponent

assets_path, images_directory

Methods included from Utils

#get_directory_file_names

Methods included from FetchOrFallbackHelper

#fetch_or_fallback, #fetch_or_fallback_boolean, #integer_or_fallback

Constructor Details

#initialize(headline: nil, sub_headline: nil, **html_options) ⇒ CardComponent

Returns a new instance of CardComponent.



9
10
11
12
13
14
15
# File 'app/components/essence/card_component.rb', line 9

def initialize(headline: nil,
               sub_headline: nil,
               **html_options)
  @headline       = headline
  @sub_headline   = sub_headline
  @html_options   = html_options
end

Instance Attribute Details

#headlineObject (readonly)

Returns the value of attribute headline.



5
6
7
# File 'app/components/essence/card_component.rb', line 5

def headline
  @headline
end

#html_optionsObject (readonly)

Returns the value of attribute html_options.



5
6
7
# File 'app/components/essence/card_component.rb', line 5

def html_options
  @html_options
end

#sub_headlineObject (readonly)

Returns the value of attribute sub_headline.



5
6
7
# File 'app/components/essence/card_component.rb', line 5

def sub_headline
  @sub_headline
end