Module: Fall::Helpers
- Included in:
- Record
- Defined in:
- lib/fall/helpers.rb
Instance Method Summary collapse
- #deflate ⇒ Object
- #deflate! ⇒ Object
- #deflate64 ⇒ Object
- #inflate ⇒ Object
- #inflate! ⇒ Object
- #inflate64(foo) ⇒ Object
- #inflate64bed ⇒ Object
- #parsedate ⇒ Object
Instance Method Details
#deflate ⇒ Object
3 4 5 |
# File 'lib/fall/helpers.rb', line 3 def deflate(...) Zlib::Deflate.deflate(...) end |
#deflate! ⇒ Object
11 12 13 |
# File 'lib/fall/helpers.rb', line 11 def deflate!(...) Zlib::Deflate.deflate(...).force_encoding('ASCII-8BIT') end |
#deflate64 ⇒ Object
19 20 21 |
# File 'lib/fall/helpers.rb', line 19 def deflate64(...) Base64.strict_encode64(deflate(...)) end |
#inflate ⇒ Object
7 8 9 |
# File 'lib/fall/helpers.rb', line 7 def inflate(...) Zlib::Inflate.inflate(...) end |
#inflate! ⇒ Object
15 16 17 |
# File 'lib/fall/helpers.rb', line 15 def inflate!(...) Zlib::Inflate.inflate(...).force_encoding('ASCII-8BIT') end |
#inflate64(foo) ⇒ Object
23 24 25 |
# File 'lib/fall/helpers.rb', line 23 def inflate64(foo) inflate(Base64.strict_decode64(foo)) end |
#inflate64bed ⇒ Object
27 28 29 |
# File 'lib/fall/helpers.rb', line 27 def inflate64bed(...) Bed.infer(inflate64(...)) end |
#parsedate ⇒ Object
31 32 33 |
# File 'lib/fall/helpers.rb', line 31 def parsedate(...) DateTime.parse(...) end |