Method: YUICompressor.streamify

Defined in:
lib/yuicompressor.rb

.streamify(stream_or_string) ⇒ Object

:nodoc:



57
58
59
60
61
62
63
64
65
# File 'lib/yuicompressor.rb', line 57

def streamify(stream_or_string) #:nodoc:
  if IO === stream_or_string || StringIO === stream_or_string
    stream_or_string
  elsif String === stream_or_string
    StringIO.new(stream_or_string.to_s)
  else
    raise ArgumentError, 'Stream or string required'
  end
end