Class: Object

Inherits:
BasicObject
Defined in:
lib/infobar.rb

Instance Method Summary collapse

Instance Method Details

#infobarObject



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

def infobar
  ::Infobar.instance
end

#with_infobar(**opts) ⇒ Object



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

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