Class: Soren::Decoders::Deflate
Instance Method Summary collapse
-
#decode ⇒ Object
: -> String.
-
#initialize(body) ⇒ Deflate
constructor
: (String) -> void.
Constructor Details
#initialize(body) ⇒ Deflate
: (String) -> void
10 11 12 |
# File 'lib/soren/decoders/deflate.rb', line 10 def initialize(body) @body = body #: String end |
Instance Method Details
#decode ⇒ Object
: -> String
15 16 17 18 19 |
# File 'lib/soren/decoders/deflate.rb', line 15 def decode Zlib::Inflate.inflate(@body) rescue Zlib::Error decode_raw_deflate end |