Module: Evil::Client::Formatter::Text
Overview
Utility module to format data as a single text
Instance Method Summary collapse
-
#call(source) ⇒ String
Formats data as a text.
Instance Method Details
#call(source) ⇒ String
Formats data as a text
13 14 15 16 17 18 19 |
# File 'lib/evil/client/formatter/text.rb', line 13 def call(source) case source when File, Tempfile then source.read when StringIO then source.string else source.to_s end end |