class SamlTool::Encoder
Attributes
output[RW]
saml[R]
Public Class Methods
encode(saml)
click to toggle source
# File lib/saml_tool/encoder.rb, line 7 def self.encode(saml) new(saml).encode end
new(saml)
click to toggle source
# File lib/saml_tool/encoder.rb, line 11 def initialize(saml) @saml = saml @output = @saml.clone end
Public Instance Methods
base64()
click to toggle source
# File lib/saml_tool/encoder.rb, line 22 def base64 self.output = Base64.encode64 output end
encode()
click to toggle source
# File lib/saml_tool/encoder.rb, line 16 def encode zlib base64 output end
zlib()
click to toggle source
# File lib/saml_tool/encoder.rb, line 26 def zlib self.output = Zlib::Deflate.deflate(output, Zlib::BEST_COMPRESSION)[2..-5] end