Class: Primer::TimelineItemComponent::Avatar
- Defined in:
- app/components/primer/timeline_item_component.rb
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Attribute Summary collapse
-
#alt ⇒ Object
readonly
Returns the value of attribute alt.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#square ⇒ Object
readonly
Returns the value of attribute square.
-
#src ⇒ Object
readonly
Returns the value of attribute src.
-
#system_arguments ⇒ Object
readonly
Returns the value of attribute system_arguments.
Instance Method Summary collapse
-
#initialize(alt: nil, src: nil, size: 40, square: true, **system_arguments) ⇒ Avatar
constructor
A new instance of Avatar.
Methods included from FetchOrFallbackHelper
Methods included from ClassNameHelper
Constructor Details
#initialize(alt: nil, src: nil, size: 40, square: true, **system_arguments) ⇒ Avatar
Returns a new instance of Avatar.
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'app/components/primer/timeline_item_component.rb', line 47 def initialize(alt: nil, src: nil, size: 40, square: true, **system_arguments) @alt = alt @src = src @size = size @square = square @system_arguments = system_arguments @system_arguments[:tag] = :div @system_arguments[:classes] = class_names( "TimelineItem-avatar", system_arguments[:classes] ) end |
Instance Attribute Details
#alt ⇒ Object (readonly)
Returns the value of attribute alt.
40 41 42 |
# File 'app/components/primer/timeline_item_component.rb', line 40 def alt @alt end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
40 41 42 |
# File 'app/components/primer/timeline_item_component.rb', line 40 def size @size end |
#square ⇒ Object (readonly)
Returns the value of attribute square.
40 41 42 |
# File 'app/components/primer/timeline_item_component.rb', line 40 def square @square end |
#src ⇒ Object (readonly)
Returns the value of attribute src.
40 41 42 |
# File 'app/components/primer/timeline_item_component.rb', line 40 def src @src end |
#system_arguments ⇒ Object (readonly)
Returns the value of attribute system_arguments.
40 41 42 |
# File 'app/components/primer/timeline_item_component.rb', line 40 def system_arguments @system_arguments end |