Class: ProgressBar::Components::Title

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-progressbar/components/title.rb

Constant Summary collapse

DEFAULT_TITLE =
'Progress'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Title

Returns a new instance of Title.



8
9
10
# File 'lib/ruby-progressbar/components/title.rb', line 8

def initialize(options = {})
  self.title = options[:title] || DEFAULT_TITLE
end

Instance Attribute Details

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/ruby-progressbar/components/title.rb', line 6

def title
  @title
end