Class: Playbook::PbProgressPills::ProgressPills
- Inherits:
-
Object
- Object
- Playbook::PbProgressPills::ProgressPills
show all
- Includes:
- Playbook::Props
- Defined in:
- app/pb_kits/playbook/pb_progress_pills/progress_pills.rb
Instance Method Summary
collapse
#generate_classname, #initialize, #prop
Instance Method Details
#active_step(step) ⇒ Object
33
34
35
|
# File 'app/pb_kits/playbook/pb_progress_pills/progress_pills.rb', line 33
def active_step(step)
step <= active ? "_active" : "_inactive"
end
|
#classname ⇒ Object
19
20
21
|
# File 'app/pb_kits/playbook/pb_progress_pills/progress_pills.rb', line 19
def classname
generate_classname("pb_progress_pills_kit", dark_class)
end
|
#dark_pill ⇒ Object
37
38
39
|
# File 'app/pb_kits/playbook/pb_progress_pills/progress_pills.rb', line 37
def dark_pill
dark ? "_dark" : nil
end
|
#each_step(&block) ⇒ Object
29
30
31
|
# File 'app/pb_kits/playbook/pb_progress_pills/progress_pills.rb', line 29
def each_step(&block)
1.upto(steps, &block)
end
|
#with_status {|title| ... } ⇒ Object
25
26
27
|
# File 'app/pb_kits/playbook/pb_progress_pills/progress_pills.rb', line 25
def with_status
yield title if title.present?
end
|