Class: Playbook::PbWeekdayStacked::WeekdayStacked
- Inherits:
-
Object
- Object
- Playbook::PbWeekdayStacked::WeekdayStacked
show all
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper, Playbook::Props
- Defined in:
- app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.rb
Instance Method Summary
collapse
#dark_props, #generate_classname, #generate_classname_without_spacing, #initialize, #prop, #spacing_options, #spacing_props, #spacing_values
Instance Method Details
#classname ⇒ Object
26
27
28
|
# File 'app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.rb', line 26
def classname
generate_classname("pb_weekday_stacked_kit", align)
end
|
#day_of_week ⇒ Object
30
31
32
33
34
35
36
|
# File 'app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.rb', line 30
def day_of_week
day = Playbook::PbKit::PbDateTime.new(date)
formatted_day = compact ? day.to_day_of_week_compact : day.to_day_of_week
content_tag(:time, datetime: day.to_iso) do
formatted_day
end
end
|
38
39
40
41
42
43
44
|
# File 'app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.rb', line 38
def formatted_month_and_day
case variant
when "day_only" then day
when "expanded" then month_and_day(format: "%b %-d")
else month_and_day
end
end
|