lib/ronin/cli/commands/decode.rb in ronin-2.0.0 vs lib/ronin/cli/commands/decode.rb in ronin-2.0.1

- old
+ new

@@ -59,32 +59,32 @@ # [FILE ...] Optional file(s) to process # class Decode < StringMethodsCommand option :base16, desc: 'Base16 decodes the data' do - require 'ronin/support/encoding/base16' - @method_calls << :base16_decode - end + require 'ronin/support/encoding/base16' + @method_calls << :base16_decode + end option :base32, desc: 'Base32 decodes the data' do - require 'ronin/support/encoding/base32' - @method_calls << :base32_decode - end + require 'ronin/support/encoding/base32' + @method_calls << :base32_decode + end option :base64, short: '-b', equals: true, value: { type: [:strict, :url], required: false }, desc: 'Base64 decodes the data' do |mode=nil| require 'ronin/support/encoding/base64' - if mode - @method_calls << [:base64_decode, [mode]] - else - @method_calls << :base64_decode - end + @method_calls << if mode + [:base64_decode, [mode]] + else + :base64_decode + end end option :zlib, short: '-z', desc: 'Zlib uncompresses the data' do require 'ronin/support/compression/core_ext' @@ -120,12 +120,12 @@ require 'ronin/support/encoding/uri' @method_calls << :uri_decode end option :http, desc: 'HTTP decodes the data' do - require 'ronin/support/encoding/http' - @method_calls << :http_decode - end + require 'ronin/support/encoding/http' + @method_calls << :http_decode + end option :js, short: '-j', desc: 'JavaScript decodes the data' do require 'ronin/support/encoding/js' @method_calls << :js_decode