Class: Primer::TimelineItemComponent::Badge
- Defined in:
- app/components/primer/timeline_item_component.rb
Overview
:nodoc
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Attribute Summary collapse
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#system_arguments ⇒ Object
readonly
Returns the value of attribute system_arguments.
Instance Method Summary collapse
-
#initialize(icon: nil, **system_arguments) ⇒ Badge
constructor
A new instance of Badge.
Methods included from JoinStyleArgumentsHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean
Methods included from ClassNameHelper
Constructor Details
#initialize(icon: nil, **system_arguments) ⇒ Badge
Returns a new instance of Badge.
69 70 71 72 73 74 75 76 77 78 |
# File 'app/components/primer/timeline_item_component.rb', line 69 def initialize(icon: nil, **system_arguments) @icon = icon @system_arguments = system_arguments @system_arguments[:tag] = :div @system_arguments[:classes] = class_names( "TimelineItem-badge", system_arguments[:classes] ) end |
Instance Attribute Details
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
65 66 67 |
# File 'app/components/primer/timeline_item_component.rb', line 65 def icon @icon end |
#system_arguments ⇒ Object (readonly)
Returns the value of attribute system_arguments.
65 66 67 |
# File 'app/components/primer/timeline_item_component.rb', line 65 def system_arguments @system_arguments end |