aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmlrpc/base64.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/xmlrpc/base64.rb
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
downloadruby-287a34ae0dfc23e4158f67cb7783d239f202c368.tar.gz
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/xmlrpc/base64.rb')
-rw-r--r--lib/xmlrpc/base64.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/xmlrpc/base64.rb b/lib/xmlrpc/base64.rb
index f9a21c703a..bfa8c0a2d5 100644
--- a/lib/xmlrpc/base64.rb
+++ b/lib/xmlrpc/base64.rb
@@ -9,19 +9,19 @@ Released under the same term of license as Ruby.
= XMLRPC::Base64
== Description
-This class is necessary for (('xmlrpc4r')) to determine that a string should
-be transmitted base64-encoded and not as a raw-string.
-You can use (({XMLRPC::Base64})) on the client and server-side as a
+This class is necessary for (('xmlrpc4r')) to determine that a string should
+be transmitted base64-encoded and not as a raw-string.
+You can use (({XMLRPC::Base64})) on the client and server-side as a
parameter and/or return-value.
== Class Methods
--- XMLRPC::Base64.new( str, state = :dec )
Creates a new (({XMLRPC::Base64})) instance with string ((|str|)) as the
- internal string. When ((|state|)) is (({:dec})) it assumes that the
- string ((|str|)) is not in base64 format (perhaps already decoded),
- otherwise if ((|state|)) is (({:enc})) it decodes ((|str|))
+ internal string. When ((|state|)) is (({:dec})) it assumes that the
+ string ((|str|)) is not in base64 format (perhaps already decoded),
+ otherwise if ((|state|)) is (({:enc})) it decodes ((|str|))
and stores it as the internal string.
-
+
--- XMLRPC::Base64.decode( str )
Decodes string ((|str|)) with base64 and returns that value.
@@ -40,7 +40,7 @@ parameter and/or return-value.
module XMLRPC
class Base64
-
+
def initialize(str, state = :dec)
case state
when :enc
@@ -51,11 +51,11 @@ class Base64
raise ArgumentError, "wrong argument; either :enc or :dec"
end
end
-
+
def decoded
- @str
+ @str
end
-
+
def encoded
Base64.encode(@str)
end