Class: Object

Inherits:
BasicObject
Defined in:
lib/infobar.rb

Instance Method Summary collapse

Instance Method Details

#infobarObject



126
127
128
# File 'lib/infobar.rb', line 126

def infobar
  ::Infobar.instance
end

#with_infobar(**opts) ⇒ Object



130
131
132
133
134
135
136
137
138
139
# File 'lib/infobar.rb', line 130

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