Module: Fall::Helpers

Included in:
Record
Defined in:
lib/fall/helpers.rb

Instance Method Summary collapse

Instance Method Details

#deflateObject



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

#deflate64Object



19
20
21
# File 'lib/fall/helpers.rb', line 19

def deflate64(...)
  Base64.strict_encode64(deflate(...))
end

#inflateObject



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

#inflate64bedObject



27
28
29
# File 'lib/fall/helpers.rb', line 27

def inflate64bed(...)
  Bed.infer(inflate64(...))
end

#parsedateObject



31
32
33
# File 'lib/fall/helpers.rb', line 31

def parsedate(...)
  DateTime.parse(...)
end