Class: Playbook::PbTimeStacked::TimeStacked
- Inherits:
-
Object
- Object
- Playbook::PbTimeStacked::TimeStacked
show all
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper, Playbook::Props
- Defined in:
- app/pb_kits/playbook/pb_time_stacked/time_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
22
23
24
|
# File 'app/pb_kits/playbook/pb_time_stacked/time_stacked.rb', line 22
def classname
generate_classname("pb_time_stacked_kit", dark_class)
end
|
#day ⇒ Object
26
27
28
29
30
31
|
# File 'app/pb_kits/playbook/pb_time_stacked/time_stacked.rb', line 26
def day
day = Playbook::PbKit::PbDateTime.new(date)
content_tag(:time, datetime: day.to_iso) do
day.to_day.to_s
end
end
|
40
41
42
|
# File 'app/pb_kits/playbook/pb_time_stacked/time_stacked.rb', line 40
def format_time_string
"#{pb_date_time.to_full_hour}:#{pb_date_time.to_minutes}#{pb_date_time.to_meridian}"
end
|
44
45
46
|
# File 'app/pb_kits/playbook/pb_time_stacked/time_stacked.rb', line 44
def format_timezone
pb_date_time.to_timezone
end
|
#month ⇒ Object
33
34
35
36
37
38
|
# File 'app/pb_kits/playbook/pb_time_stacked/time_stacked.rb', line 33
def month
month = Playbook::PbKit::PbDateTime.new(date)
content_tag(:time, datetime: month.to_iso) do
month.to_month.to_s
end
end
|