Sha256: ea88471f5d26edeca14067c9d526d0a777b4e1fc68b6f6f4ad1b0921372a7284
Contents?: true
Size: 419 Bytes
Versions: 5
Compression:
Stored size: 419 Bytes
Contents
module CrossStub module Arguments #:nodoc: module Hash class << self def parse(hash) hash.inject({}) do |memo, (name, val)| marshalized = Base64.encode64(Marshal.dump(val)).gsub('|','\|') code = "def #{name} ; Marshal.load(Base64.decode64(%|#{marshalized}|)) ; end" memo.merge(:"#{name}" => code) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems