Class: Object

Inherits:
BasicObject
Defined in:
lib/infobar.rb

Instance Method Summary collapse

Instance Method Details

#infobarObject



146
147
148
# File 'lib/infobar.rb', line 146

def infobar
  ::Infobar.instance
end

#with_infobar(**opts) ⇒ Object



150
151
152
153
154
155
156
157
158
159
# File 'lib/infobar.rb', line 150

def with_infobar(**opts)
  case
  when total = opts[:total].ask_and_send(:to_sym)
    opts[:total] = __send__(total)
  when opts[:total].nil?
    opts[:total] = size
  end
  Infobar.(**opts)
  self
end