Class: Playbook::PbProgressPills::ProgressPills

Inherits:
Object
  • Object
show all
Includes:
Playbook::Props
Defined in:
app/pb_kits/playbook/pb_progress_pills/progress_pills.rb

Instance Method Summary collapse

Methods included from Playbook::Props

#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

#classnameObject



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_pillObject



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

Yields:

  • (title)


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