Class: Shoehorn::Components::ProgressBar

Inherits:
Base
  • Object
show all
Defined in:
lib/shoehorn/components/progress_bar.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#options, #output_buffer

Instance Method Summary collapse

Constructor Details

#initialize(width, options = {}) ⇒ ProgressBar

Returns a new instance of ProgressBar.



5
6
7
8
# File 'lib/shoehorn/components/progress_bar.rb', line 5

def initialize(width, options = {})
  super
  @width = width
end

Instance Attribute Details

#widthObject

Returns the value of attribute width.



3
4
5
# File 'lib/shoehorn/components/progress_bar.rb', line 3

def width
  @width
end

Instance Method Details

#to_sObject



10
11
12
13
14
15
# File 'lib/shoehorn/components/progress_bar.rb', line 10

def to_s
  output_buffer << (:div, build_div_options) do
    build_bar_tag.html_safe
  end.html_safe
  super
end