Module: Stupidedi::Reader::Input

Defined in:
lib/stupidedi/reader/input.rb

Constructors collapse

Class Method Details

.build(o, *args) ⇒ Input

Returns:


16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/stupidedi/reader/input.rb', line 16

def build(o, *args)
  case o
  when AbstractInput
    o
  when IO
    FileInput.new(o, *args)
  when String, Array
    DelegatedInput.new(o, *args)
  else
    raise TypeError
  end
end