Method: Functional::Pager#initialize

Defined in:
lib/functional.rb

#initialize(*opts) ⇒ Pager

Returns a new instance of Pager.



306
307
308
309
310
311
312
313
314
# File 'lib/functional.rb', line 306

def initialize *opts
  @pager = IO.popen ENV['PAGER'] || 'less', 'w'
  opts.each do |opt|
    case opt.to_s
    when *%w[inspect i] then alias call call_inspect
    else raise ArgumentError, "Unknown opt: #{opt}"
    end
  end
end