Class: Playbook::PbTitleCount::TitleCount
- Inherits:
-
Object
- Object
- Playbook::PbTitleCount::TitleCount
show all
- Includes:
- Playbook::Props
- Defined in:
- app/pb_kits/playbook/pb_title_count/title_count.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
19
20
21
|
# File 'app/pb_kits/playbook/pb_title_count/title_count.rb', line 19
def classname
generate_classname("pb_title_count_kit", align, size)
end
|
27
28
29
|
# File 'app/pb_kits/playbook/pb_title_count/title_count.rb', line 27
def format_count
count.to_s.gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/, '\1,\2')
end
|
#title_size ⇒ Object
23
24
25
|
# File 'app/pb_kits/playbook/pb_title_count/title_count.rb', line 23
def title_size
size == "lg" ? 3 : 4
end
|