Class: Playbook::PbTime::Time
- Inherits:
-
Object
- Object
- Playbook::PbTime::Time
show all
- Includes:
- Playbook::Props
- Defined in:
- app/pb_kits/playbook/pb_time/time.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
23
24
25
26
27
28
29
30
|
# File 'app/pb_kits/playbook/pb_time/time.rb', line 23
def classname
mutated_size = size
mutated_size = "sm" if mutated_size == "xs"
mutated_size = "md" if mutated_size == "lg"
generate_classname("pb_time_kit", align, mutated_size)
end
|
32
33
34
|
# File 'app/pb_kits/playbook/pb_time/time.rb', line 32
def format_time_string
"#{pb_date_time.to_hour}:#{pb_date_time.to_minutes}#{pb_date_time.to_meridian}"
end
|
36
37
38
|
# File 'app/pb_kits/playbook/pb_time/time.rb', line 36
def format_timezone_string
pb_date_time.to_timezone.to_s
end
|
#pb_date_time ⇒ Object
40
41
42
|
# File 'app/pb_kits/playbook/pb_time/time.rb', line 40
def pb_date_time
Playbook::PbKit::PbDateTime.new(time, timezone)
end
|