Class: XMLRPC::Base64
- Inherits:
-
Object
- Object
- XMLRPC::Base64
- Defined in:
- lib/xmlrpc/base64.rb
Class Method Summary collapse
Instance Method Summary collapse
- #decoded ⇒ Object
- #encoded ⇒ Object
-
#initialize(str, state = :dec) ⇒ Base64
constructor
A new instance of Base64.
Constructor Details
#initialize(str, state = :dec) ⇒ Base64
Returns a new instance of Base64.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/xmlrpc/base64.rb', line 44 def initialize(str, state = :dec) case state when :enc @str = Base64.decode(str) when :dec @str = str else raise ArgumentError, "wrong argument; either :enc or :dec" end end |