marilyn-rpc 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. data/README.md +39 -4
  2. data/examples/async/client.rb +0 -5
  3. data/examples/authentication/client.rb +18 -0
  4. data/examples/authentication/server.rb +30 -0
  5. data/lib/marilyn-rpc.rb +1 -1
  6. data/lib/marilyn-rpc/client.rb +21 -3
  7. data/lib/marilyn-rpc/error.rb +13 -0
  8. data/lib/marilyn-rpc/mails.rb +3 -3
  9. data/lib/marilyn-rpc/server.rb +6 -11
  10. data/lib/marilyn-rpc/service.rb +86 -11
  11. data/lib/marilyn-rpc/service_cache.rb +44 -23
  12. data/lib/marilyn-rpc/version.rb +1 -1
  13. data/spec/mails_spec.rb +2 -1
  14. data/spec/server_spec.rb +1 -1
  15. data/spec/service_cache_spec.rb +140 -0
  16. data/spec/service_spec.rb +56 -5
  17. data/spec/spec_helper.rb +5 -0
  18. metadata +10 -34
  19. data/doc/MarilynRPC.html +0 -108
  20. data/doc/MarilynRPC/CallRequestMail.html +0 -578
  21. data/doc/MarilynRPC/CallResponseMail.html +0 -418
  22. data/doc/MarilynRPC/Envelope.html +0 -705
  23. data/doc/MarilynRPC/ExceptionMail.html +0 -338
  24. data/doc/MarilynRPC/Gentleman.html +0 -658
  25. data/doc/MarilynRPC/MailFactory.html +0 -284
  26. data/doc/MarilynRPC/MailHelper.html +0 -489
  27. data/doc/MarilynRPC/NativeClient.html +0 -579
  28. data/doc/MarilynRPC/NativeClientProxy.html +0 -303
  29. data/doc/MarilynRPC/Server.html +0 -406
  30. data/doc/MarilynRPC/Service.html +0 -599
  31. data/doc/MarilynRPC/ServiceCache.html +0 -481
  32. data/doc/_index.html +0 -219
  33. data/doc/class_list.html +0 -36
  34. data/doc/css/common.css +0 -1
  35. data/doc/css/full_list.css +0 -53
  36. data/doc/css/style.css +0 -318
  37. data/doc/file.README.html +0 -154
  38. data/doc/file_list.html +0 -38
  39. data/doc/frames.html +0 -13
  40. data/doc/index.html +0 -154
  41. data/doc/js/app.js +0 -203
  42. data/doc/js/full_list.js +0 -149
  43. data/doc/js/jquery.js +0 -16
  44. data/doc/method_list.html +0 -467
  45. data/doc/top-level-namespace.html +0 -88
  46. data/spec/service_cache.rb +0 -45
@@ -1,3 +1,3 @@
1
1
  module MarilynRPC
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -46,11 +46,12 @@ describe "MarilynRPC Mails" do
46
46
  rescue Exception => ex
47
47
  exception = ex
48
48
  end
49
- mail = MarilynRPC::ExceptionMail.new(exception)
49
+ mail = MarilynRPC::ExceptionMail.new(123, exception)
50
50
  data = mail.encode
51
51
  data.should include("TestError")
52
52
  mail = MarilynRPC::ExceptionMail.new
53
53
  mail.decode(data)
54
+ mail.tag.should == 123
54
55
  mail.exception.message.should == "TestError"
55
56
  mail.exception.backtrace.size.should > 1
56
57
  end
@@ -25,7 +25,7 @@ describe MarilynRPC::Server do
25
25
  envelope.parse!(@server.data)
26
26
  mail = MarilynRPC::ExceptionMail.new
27
27
  mail.decode(envelope.content)
28
- mail.exception.message.should == "The passed type \"T\" is unknown!"
28
+ mail.exception.message.should == "The passed envelope is broken!"
29
29
  @server.receive_data(MarilynRPC::Envelope.new("Test2").encode)
30
30
  @server.receive_data(MarilynRPC::Envelope.new("Test3").encode)
31
31
  @server.unbind
@@ -0,0 +1,140 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe MarilynRPC::ServiceCache do
4
+ before(:each) do
5
+ class DeferObjectMock
6
+ attr_accessor :callback
7
+
8
+ def callback(&block)
9
+ @callback = block
10
+ end
11
+
12
+ def call(*args)
13
+ @callback.call(*args)
14
+ end
15
+ end
16
+
17
+ class TestService < MarilynRPC::Service
18
+ attr_accessor :value
19
+ register "/test"
20
+ after_connect :init_value
21
+ after_disconnect :change_value
22
+
23
+ def init_value
24
+ @value = false
25
+ end
26
+
27
+ def sync_method(a, b)
28
+ a + b
29
+ end
30
+
31
+ def async_method(a, b)
32
+ calc = DeferObjectMock.new
33
+ MarilynRPC::Gentleman.new(calc) { |result| result }
34
+ end
35
+
36
+ def change_value
37
+ @value = true
38
+ end
39
+ end
40
+
41
+ @cache = MarilynRPC::ServiceCache.new
42
+ end
43
+
44
+ it "should be possible to make lookups and get the same instance" do
45
+ [@cache.lookup("/test")].should == [@cache.lookup("/test")]
46
+ end
47
+
48
+ it "should not pe possible to get a unknown service" do
49
+ lambda do
50
+ @cache.lookup(:xxx)
51
+ end.should raise_error(MarilynRPC::UnknownServiceError)
52
+ end
53
+
54
+ it "should be possible to issue the disconnect! event from the cache" do
55
+ expect do
56
+ @cache.disconnect!
57
+ end.to(change(@cache.lookup("/test"), :value).from(false).to(true))
58
+ end
59
+
60
+ it "should be possible to call a sync method" do
61
+ answer = @cache.call(envelope_call(1, "/test", :sync_method, 1, 2))
62
+ answer.should be_a(MarilynRPC::CallResponseMail)
63
+ answer.result.should == 3
64
+ end
65
+
66
+ it "should be possible to call an async method" do
67
+ answer = @cache.call(envelope_call(1, "/test", :async_method, 1, 2))
68
+ answer.should be_a(MarilynRPC::Gentleman)
69
+ answer.tag.should == 1
70
+ end
71
+
72
+ context "authentication" do
73
+ before(:each) do
74
+ MarilynRPC::Service.authenticate_with do |username, password|
75
+ username == "testuserid" && password == "secret"
76
+ end
77
+
78
+ class TestService < MarilynRPC::Service
79
+ register "/test"
80
+ authentication_required :secure
81
+
82
+ def normal
83
+ true
84
+ end
85
+
86
+ def username
87
+ session_username
88
+ end
89
+
90
+ def logged_in?
91
+ session_authenticated?
92
+ end
93
+
94
+ def secure
95
+ true
96
+ end
97
+ end
98
+ @cache = MarilynRPC::ServiceCache.new
99
+ end
100
+
101
+ it "should be possible to call the normal method" do
102
+ answer = @cache.call(envelope_call(1, "/test", :normal))
103
+ answer.result.should == true
104
+ end
105
+
106
+ it "should not be possible to call an secure method without authentication" do
107
+ answer = @cache.call(envelope_call(1, "/test", :secure))
108
+ answer.should be_a(MarilynRPC::ExceptionMail)
109
+ answer.exception.should be_a(MarilynRPC::PermissionDeniedError)
110
+ end
111
+
112
+ it "should be possible to call an secure method with authentication" do
113
+ @cache.call(envelope_call(1, MarilynRPC::Service::AUTHENTICATION_PATH,
114
+ :authenticate_plain, "testuserid", "secret"))
115
+ answer = @cache.call(envelope_call(1, "/test", :secure))
116
+ answer.result.should == true
117
+ end
118
+
119
+ it "should be possible to call the username from within the service without an authenticated user" do
120
+ answer = @cache.call(envelope_call(1, "/test", :username))
121
+ answer.result.should == nil
122
+ end
123
+
124
+ it "should be possible to call the username from within the service with an authenticated user" do
125
+ @cache.username = "test"
126
+ answer = @cache.call(envelope_call(1, "/test", :username))
127
+ answer.result.should == "test"
128
+ end
129
+
130
+ it "should be possible to call the authentication from within the service" do
131
+ answer = @cache.call(envelope_call(1, "/test", :logged_in?))
132
+ answer.result.should == false
133
+
134
+ # set the username
135
+ @cache.username = "test"
136
+ answer = @cache.call(envelope_call(1, "/test", :logged_in?))
137
+ answer.result.should == true
138
+ end
139
+ end
140
+ end
@@ -12,10 +12,61 @@ describe MarilynRPC::Service do
12
12
  end
13
13
 
14
14
  it "should have to registered services" do
15
- MarilynRPC::Service.registry.size.should == 2
16
- MarilynRPC::Service.registry.should == {
17
- "/test/extended" => ExtendedTestService,
18
- "/test" => TestService
19
- }
15
+ MarilynRPC::Service.__registry__.size.should >= 2
16
+ MarilynRPC::Service.__registry__["/test/extended"].should == ExtendedTestService
17
+ MarilynRPC::Service.__registry__["/test"].should == TestService
18
+ end
19
+
20
+ context "callbacks" do
21
+ before(:each) do
22
+ class ExtendedTestService < MarilynRPC::Service
23
+ attr_reader :value
24
+ after_connect :connect
25
+ after_disconnect :disconnect
26
+
27
+ def connect
28
+ @value = :connect
29
+ end
30
+
31
+ def disconnect
32
+ @value = :disconnect
33
+ end
34
+ end
35
+ @service = ExtendedTestService.new
36
+ end
37
+
38
+ it "should be possible to register a after_connect callback" do
39
+ expect do
40
+ @service.__run_callbacks__(:after_connect)
41
+ end.to(change(@service, :value).from(nil).to(:connect))
42
+
43
+ end
44
+
45
+ it "should be possible to register a after_disconnect callback" do
46
+ expect do
47
+ @service.__run_callbacks__(:after_disconnect)
48
+ end.to(change(@service, :value).from(nil).to(:disconnect))
49
+ end
50
+ end
51
+
52
+ context "authentication" do
53
+ before(:each) do
54
+ class ExtendedTestService < MarilynRPC::Service
55
+ authentication_required :secure
56
+
57
+ def normal
58
+ true
59
+ end
60
+
61
+ def secure
62
+ false
63
+ end
64
+ end
65
+ @service = ExtendedTestService.new
66
+ end
67
+
68
+ it "should be possible to find the secure method in the auth. hash" do
69
+ @service.class.__methods_with_authentication__[:secure].should be_true
70
+ end
20
71
  end
21
72
  end
@@ -1,2 +1,7 @@
1
1
  $:.push(File.join(File.dirname(__FILE__), "..", "lib"))
2
2
  require "marilyn-rpc"
3
+
4
+ def envelope_call(tag, path, method, *args)
5
+ mail = MarilynRPC::CallRequestMail.new(tag, path, method, args)
6
+ MarilynRPC::Envelope.new(mail.encode)
7
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marilyn-rpc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
4
+ hash: 25
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Vincent Landgraf
@@ -62,35 +62,10 @@ extra_rdoc_files: []
62
62
  files:
63
63
  - benchmark/client.rb
64
64
  - benchmark/server.rb
65
- - doc/_index.html
66
- - doc/class_list.html
67
- - doc/css/common.css
68
- - doc/css/full_list.css
69
- - doc/css/style.css
70
- - doc/file.README.html
71
- - doc/file_list.html
72
- - doc/frames.html
73
- - doc/index.html
74
- - doc/js/app.js
75
- - doc/js/full_list.js
76
- - doc/js/jquery.js
77
- - doc/MarilynRPC/CallRequestMail.html
78
- - doc/MarilynRPC/CallResponseMail.html
79
- - doc/MarilynRPC/Envelope.html
80
- - doc/MarilynRPC/ExceptionMail.html
81
- - doc/MarilynRPC/Gentleman.html
82
- - doc/MarilynRPC/MailFactory.html
83
- - doc/MarilynRPC/MailHelper.html
84
- - doc/MarilynRPC/NativeClient.html
85
- - doc/MarilynRPC/NativeClientProxy.html
86
- - doc/MarilynRPC/Server.html
87
- - doc/MarilynRPC/Service.html
88
- - doc/MarilynRPC/ServiceCache.html
89
- - doc/MarilynRPC.html
90
- - doc/method_list.html
91
- - doc/top-level-namespace.html
92
65
  - examples/async/client.rb
93
66
  - examples/async/server.rb
67
+ - examples/authentication/client.rb
68
+ - examples/authentication/server.rb
94
69
  - examples/callbacks/client.rb
95
70
  - examples/callbacks/server.rb
96
71
  - examples/secure/client.rb
@@ -98,6 +73,7 @@ files:
98
73
  - kiss.png
99
74
  - lib/marilyn-rpc/client.rb
100
75
  - lib/marilyn-rpc/envelope.rb
76
+ - lib/marilyn-rpc/error.rb
101
77
  - lib/marilyn-rpc/gentleman.rb
102
78
  - lib/marilyn-rpc/mails.rb
103
79
  - lib/marilyn-rpc/server.rb
@@ -112,7 +88,7 @@ files:
112
88
  - spec/gentleman_spec.rb
113
89
  - spec/mails_spec.rb
114
90
  - spec/server_spec.rb
115
- - spec/service_cache.rb
91
+ - spec/service_cache_spec.rb
116
92
  - spec/service_spec.rb
117
93
  - spec/spec_helper.rb
118
94
  has_rdoc: true
@@ -145,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
121
  requirements: []
146
122
 
147
123
  rubyforge_project:
148
- rubygems_version: 1.3.7
124
+ rubygems_version: 1.6.2
149
125
  signing_key:
150
126
  specification_version: 3
151
127
  summary: Simple, beautiful event-based RPC
@@ -154,6 +130,6 @@ test_files:
154
130
  - spec/gentleman_spec.rb
155
131
  - spec/mails_spec.rb
156
132
  - spec/server_spec.rb
157
- - spec/service_cache.rb
133
+ - spec/service_cache_spec.rb
158
134
  - spec/service_spec.rb
159
135
  - spec/spec_helper.rb
@@ -1,108 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>Module: MarilynRPC</title>
7
- <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
8
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
-
10
- <script type="text/javascript" charset="utf-8">
11
- relpath = '';
12
- if (relpath != '') relpath += '/';
13
- </script>
14
- <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
15
- <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
16
-
17
- </head>
18
- <body>
19
- <script type="text/javascript" charset="utf-8">
20
- if (window.top.frames.main) document.body.className = 'frames';
21
- </script>
22
-
23
- <div id="header">
24
- <div id="menu">
25
-
26
- <a href="_index.html">Index (M)</a> &raquo;
27
-
28
-
29
- <span class="title">MarilynRPC</span>
30
-
31
-
32
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
- </div>
34
-
35
- <div id="search">
36
- <a id="class_list_link" href="#">Class List</a>
37
- <a id="method_list_link" href="#">Method List</a>
38
- <a id ="file_list_link" href="#">File List</a>
39
- </div>
40
-
41
- <div class="clear"></div>
42
- </div>
43
-
44
- <iframe id="search_frame"></iframe>
45
-
46
- <div id="content"><h1>Module: MarilynRPC
47
-
48
-
49
-
50
- </h1>
51
-
52
- <dl class="box">
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
- <dt class="r1 last">Defined in:</dt>
62
- <dd class="r1 last">lib/marilyn-rpc/mails.rb<span class="defines">,<br />
63
- lib/marilyn-rpc/client.rb,<br /> lib/marilyn-rpc/version.rb</span>
64
- </dd>
65
-
66
- </dl>
67
- <div class="clear"></div>
68
-
69
- <h2>Defined Under Namespace</h2>
70
- <p class="children">
71
-
72
-
73
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="MarilynRPC/MailFactory.html" title="MarilynRPC::MailFactory (module)">MailFactory</a></span>, <span class='object_link'><a href="MarilynRPC/MailHelper.html" title="MarilynRPC::MailHelper (module)">MailHelper</a></span>, <span class='object_link'><a href="MarilynRPC/Server.html" title="MarilynRPC::Server (module)">Server</a></span>
74
-
75
-
76
-
77
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="MarilynRPC/CallRequestMail.html" title="MarilynRPC::CallRequestMail (class)">CallRequestMail</a></span>, <span class='object_link'><a href="MarilynRPC/CallResponseMail.html" title="MarilynRPC::CallResponseMail (class)">CallResponseMail</a></span>, <span class='object_link'><a href="MarilynRPC/Envelope.html" title="MarilynRPC::Envelope (class)">Envelope</a></span>, <span class='object_link'><a href="MarilynRPC/ExceptionMail.html" title="MarilynRPC::ExceptionMail (class)">ExceptionMail</a></span>, <span class='object_link'><a href="MarilynRPC/Gentleman.html" title="MarilynRPC::Gentleman (class)">Gentleman</a></span>, <span class='object_link'><a href="MarilynRPC/NativeClient.html" title="MarilynRPC::NativeClient (class)">NativeClient</a></span>, <span class='object_link'><a href="MarilynRPC/NativeClientProxy.html" title="MarilynRPC::NativeClientProxy (class)">NativeClientProxy</a></span>, <span class='object_link'><a href="MarilynRPC/Service.html" title="MarilynRPC::Service (class)">Service</a></span>, <span class='object_link'><a href="MarilynRPC/ServiceCache.html" title="MarilynRPC::ServiceCache (class)">ServiceCache</a></span>
78
-
79
-
80
- </p>
81
-
82
- <h2>Constant Summary</h2>
83
-
84
- <dl class="constants">
85
-
86
- <dt id="VERSION-constant" class="">VERSION =
87
-
88
- </dt>
89
- <dd><pre class="code"><span class='string val'>'0.0.1'</span>
90
- </pre></dd>
91
-
92
- </dl>
93
-
94
-
95
-
96
-
97
-
98
-
99
- </div>
100
-
101
- <div id="footer">
102
- Generated on Wed Jun 8 18:26:45 2011 by
103
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
104
- 0.6.8 (ruby-1.8.7).
105
- </div>
106
-
107
- </body>
108
- </html>
@@ -1,578 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>Class: MarilynRPC::CallRequestMail</title>
7
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
-
10
- <script type="text/javascript" charset="utf-8">
11
- relpath = '..';
12
- if (relpath != '') relpath += '/';
13
- </script>
14
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
-
17
- </head>
18
- <body>
19
- <script type="text/javascript" charset="utf-8">
20
- if (window.top.frames.main) document.body.className = 'frames';
21
- </script>
22
-
23
- <div id="header">
24
- <div id="menu">
25
-
26
- <a href="../_index.html">Index (C)</a> &raquo;
27
- <span class='title'><span class='object_link'><a href="../MarilynRPC.html" title="MarilynRPC (module)">MarilynRPC</a></span></span>
28
- &raquo;
29
- <span class="title">CallRequestMail</span>
30
-
31
-
32
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
- </div>
34
-
35
- <div id="search">
36
- <a id="class_list_link" href="#">Class List</a>
37
- <a id="method_list_link" href="#">Method List</a>
38
- <a id ="file_list_link" href="#">File List</a>
39
- </div>
40
-
41
- <div class="clear"></div>
42
- </div>
43
-
44
- <iframe id="search_frame"></iframe>
45
-
46
- <div id="content"><h1>Class: MarilynRPC::CallRequestMail
47
-
48
-
49
-
50
- </h1>
51
-
52
- <dl class="box">
53
-
54
- <dt class="r1">Inherits:</dt>
55
- <dd class="r1">
56
- <span class="inheritName">Struct</span>
57
-
58
- <ul class="fullTree">
59
- <li>Object</li>
60
-
61
- <li class="next">Struct</li>
62
-
63
- <li class="next">MarilynRPC::CallRequestMail</li>
64
-
65
- </ul>
66
- <a href="#" class="inheritanceTree">show all</a>
67
-
68
- </dd>
69
-
70
-
71
-
72
-
73
-
74
-
75
- <dt class="r2">Includes:</dt>
76
- <dd class="r2"><span class='object_link'><a href="MailHelper.html" title="MarilynRPC::MailHelper (module)">MailHelper</a></span></dd>
77
-
78
-
79
-
80
-
81
-
82
- <dt class="r1 last">Defined in:</dt>
83
- <dd class="r1 last">lib/marilyn-rpc/mails.rb</dd>
84
-
85
- </dl>
86
- <div class="clear"></div>
87
-
88
-
89
- <h2>Constant Summary</h2>
90
-
91
- <dl class="constants">
92
-
93
- <dt id="TYPE-constant" class="">TYPE =
94
-
95
- </dt>
96
- <dd><pre class="code"><span class='MarilynRPC constant id'>MarilynRPC</span><span class='colon2 op'>::</span><span class='MailHelper constant id'>MailHelper</span><span class='dot token'>.</span><span class='type identifier id'>type</span><span class='lparen token'>(</span><span class='integer val'>1</span><span class='rparen token'>)</span>
97
- </pre></dd>
98
-
99
- </dl>
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
109
- <ul class="summary">
110
-
111
- <li class="public ">
112
- <span class="summary_signature">
113
-
114
- <a href="#args-instance_method" title="#args (instance method)">- (Object) <strong>args</strong> </a>
115
-
116
-
117
-
118
- </span>
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
- <span class="summary_desc"><div class='inline'><p>Returns the value of attribute args.</p></div></span>
131
-
132
- </li>
133
-
134
-
135
- <li class="public ">
136
- <span class="summary_signature">
137
-
138
- <a href="#method-instance_method" title="#method (instance method)">- (Object) <strong>method</strong> </a>
139
-
140
-
141
-
142
- </span>
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
- <span class="summary_desc"><div class='inline'><p>Returns the value of attribute method.</p></div></span>
155
-
156
- </li>
157
-
158
-
159
- <li class="public ">
160
- <span class="summary_signature">
161
-
162
- <a href="#path-instance_method" title="#path (instance method)">- (Object) <strong>path</strong> </a>
163
-
164
-
165
-
166
- </span>
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
- <span class="summary_desc"><div class='inline'><p>Returns the value of attribute path.</p></div></span>
179
-
180
- </li>
181
-
182
-
183
- <li class="public ">
184
- <span class="summary_signature">
185
-
186
- <a href="#tag-instance_method" title="#tag (instance method)">- (Object) <strong>tag</strong> </a>
187
-
188
-
189
-
190
- </span>
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
- <span class="summary_desc"><div class='inline'><p>Returns the value of attribute tag.</p></div></span>
203
-
204
- </li>
205
-
206
-
207
- </ul>
208
-
209
-
210
-
211
- <h2>
212
- Instance Method Summary
213
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
214
- </h2>
215
-
216
- <ul class="summary">
217
-
218
- <li class="public ">
219
- <span class="summary_signature">
220
-
221
- <a href="#decode-instance_method" title="#decode (instance method)">- (Object) <strong>decode</strong>(data) </a>
222
-
223
-
224
-
225
- </span>
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
- <span class="summary_desc"><div class='inline'></div></span>
235
-
236
- </li>
237
-
238
-
239
- <li class="public ">
240
- <span class="summary_signature">
241
-
242
- <a href="#encode-instance_method" title="#encode (instance method)">- (Object) <strong>encode</strong> </a>
243
-
244
-
245
-
246
- </span>
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
- <span class="summary_desc"><div class='inline'></div></span>
256
-
257
- </li>
258
-
259
-
260
- </ul>
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
- <h3 class="inherited">Methods included from <span class='object_link'><a href="MailHelper.html" title="MarilynRPC::MailHelper (module)">MailHelper</a></span></h3>
272
- <p class="inherited"><span class='object_link'><a href="MailHelper.html#deserialize-instance_method" title="MarilynRPC::MailHelper#deserialize (method)">#deserialize</a></span>, <span class='object_link'><a href="MailHelper.html#only_data-instance_method" title="MarilynRPC::MailHelper#only_data (method)">#only_data</a></span>, <span class='object_link'><a href="MailHelper.html#serialize-instance_method" title="MarilynRPC::MailHelper#serialize (method)">#serialize</a></span>, <span class='object_link'><a href="MailHelper.html#type-class_method" title="MarilynRPC::MailHelper.type (method)">type</a></span></p>
273
-
274
-
275
- <div id="instance_attr_details" class="attr_details">
276
- <h2>Instance Attribute Details</h2>
277
-
278
-
279
- <span id="args=-instance_method"></span>
280
- <span id="args-instance_method"></span>
281
- <div class="method_details first">
282
- <p class="signature first" id="args-instance_method">
283
-
284
- - (<tt>Object</tt>) <strong>args</strong>
285
-
286
-
287
-
288
- </p><div class="docstring">
289
- <div class="discussion">
290
- <p>Returns the value of attribute args</p>
291
-
292
- </div>
293
- </div>
294
- <div class="tags">
295
- <h3>Returns:</h3>
296
- <ul class="return">
297
-
298
- <li>
299
-
300
- <span class='type'>(<tt>Object</tt>)</span>
301
-
302
-
303
-
304
-
305
- &mdash;
306
- <div class='inline'><p>the current value of args</p></div>
307
-
308
- </li>
309
-
310
- </ul>
311
-
312
- </div><table class="source_code">
313
- <tr>
314
- <td>
315
- <pre class="lines">
316
-
317
-
318
- 33
319
- 34
320
- 35</pre>
321
- </td>
322
- <td>
323
- <pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 33</span>
324
-
325
- <span class='def def kw'>def</span> <span class='args identifier id'>args</span>
326
- <span class='@args ivar id'>@args</span>
327
- <span class='end end kw'>end</span>
328
- </pre>
329
- </td>
330
- </tr>
331
- </table>
332
- </div>
333
-
334
-
335
- <span id="method=-instance_method"></span>
336
- <span id="method-instance_method"></span>
337
- <div class="method_details ">
338
- <p class="signature " id="method-instance_method">
339
-
340
- - (<tt>Object</tt>) <strong>method</strong>
341
-
342
-
343
-
344
- </p><div class="docstring">
345
- <div class="discussion">
346
- <p>Returns the value of attribute method</p>
347
-
348
- </div>
349
- </div>
350
- <div class="tags">
351
- <h3>Returns:</h3>
352
- <ul class="return">
353
-
354
- <li>
355
-
356
- <span class='type'>(<tt>Object</tt>)</span>
357
-
358
-
359
-
360
-
361
- &mdash;
362
- <div class='inline'><p>the current value of method</p></div>
363
-
364
- </li>
365
-
366
- </ul>
367
-
368
- </div><table class="source_code">
369
- <tr>
370
- <td>
371
- <pre class="lines">
372
-
373
-
374
- 33
375
- 34
376
- 35</pre>
377
- </td>
378
- <td>
379
- <pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 33</span>
380
-
381
- <span class='def def kw'>def</span> <span class='method identifier id'>method</span>
382
- <span class='@method ivar id'>@method</span>
383
- <span class='end end kw'>end</span>
384
- </pre>
385
- </td>
386
- </tr>
387
- </table>
388
- </div>
389
-
390
-
391
- <span id="path=-instance_method"></span>
392
- <span id="path-instance_method"></span>
393
- <div class="method_details ">
394
- <p class="signature " id="path-instance_method">
395
-
396
- - (<tt>Object</tt>) <strong>path</strong>
397
-
398
-
399
-
400
- </p><div class="docstring">
401
- <div class="discussion">
402
- <p>Returns the value of attribute path</p>
403
-
404
- </div>
405
- </div>
406
- <div class="tags">
407
- <h3>Returns:</h3>
408
- <ul class="return">
409
-
410
- <li>
411
-
412
- <span class='type'>(<tt>Object</tt>)</span>
413
-
414
-
415
-
416
-
417
- &mdash;
418
- <div class='inline'><p>the current value of path</p></div>
419
-
420
- </li>
421
-
422
- </ul>
423
-
424
- </div><table class="source_code">
425
- <tr>
426
- <td>
427
- <pre class="lines">
428
-
429
-
430
- 33
431
- 34
432
- 35</pre>
433
- </td>
434
- <td>
435
- <pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 33</span>
436
-
437
- <span class='def def kw'>def</span> <span class='path identifier id'>path</span>
438
- <span class='@path ivar id'>@path</span>
439
- <span class='end end kw'>end</span>
440
- </pre>
441
- </td>
442
- </tr>
443
- </table>
444
- </div>
445
-
446
-
447
- <span id="tag=-instance_method"></span>
448
- <span id="tag-instance_method"></span>
449
- <div class="method_details ">
450
- <p class="signature " id="tag-instance_method">
451
-
452
- - (<tt>Object</tt>) <strong>tag</strong>
453
-
454
-
455
-
456
- </p><div class="docstring">
457
- <div class="discussion">
458
- <p>Returns the value of attribute tag</p>
459
-
460
- </div>
461
- </div>
462
- <div class="tags">
463
- <h3>Returns:</h3>
464
- <ul class="return">
465
-
466
- <li>
467
-
468
- <span class='type'>(<tt>Object</tt>)</span>
469
-
470
-
471
-
472
-
473
- &mdash;
474
- <div class='inline'><p>the current value of tag</p></div>
475
-
476
- </li>
477
-
478
- </ul>
479
-
480
- </div><table class="source_code">
481
- <tr>
482
- <td>
483
- <pre class="lines">
484
-
485
-
486
- 33
487
- 34
488
- 35</pre>
489
- </td>
490
- <td>
491
- <pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 33</span>
492
-
493
- <span class='def def kw'>def</span> <span class='tag identifier id'>tag</span>
494
- <span class='@tag ivar id'>@tag</span>
495
- <span class='end end kw'>end</span>
496
- </pre>
497
- </td>
498
- </tr>
499
- </table>
500
- </div>
501
-
502
- </div>
503
-
504
-
505
- <div id="instance_method_details" class="method_details_list">
506
- <h2>Instance Method Details</h2>
507
-
508
-
509
- <div class="method_details first">
510
- <p class="signature first" id="decode-instance_method">
511
-
512
- - (<tt>Object</tt>) <strong>decode</strong>(data)
513
-
514
-
515
-
516
- </p><table class="source_code">
517
- <tr>
518
- <td>
519
- <pre class="lines">
520
-
521
-
522
- 41
523
- 42
524
- 43</pre>
525
- </td>
526
- <td>
527
- <pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 41</span>
528
-
529
- <span class='def def kw'>def</span> <span class='decode identifier id'>decode</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
530
- <span class='self self kw'>self</span><span class='dot token'>.</span><span class='tag identifier id'>tag</span><span class='comma token'>,</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='method identifier id'>method</span><span class='comma token'>,</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='args identifier id'>args</span> <span class='assign token'>=</span> <span class='deserialize identifier id'>deserialize</span><span class='lparen token'>(</span><span class='only_data identifier id'>only_data</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
531
- <span class='end end kw'>end</span>
532
- </pre>
533
- </td>
534
- </tr>
535
- </table>
536
- </div>
537
-
538
- <div class="method_details ">
539
- <p class="signature " id="encode-instance_method">
540
-
541
- - (<tt>Object</tt>) <strong>encode</strong>
542
-
543
-
544
-
545
- </p><table class="source_code">
546
- <tr>
547
- <td>
548
- <pre class="lines">
549
-
550
-
551
- 37
552
- 38
553
- 39</pre>
554
- </td>
555
- <td>
556
- <pre class="code"><span class="info file"># File 'lib/marilyn-rpc/mails.rb', line 37</span>
557
-
558
- <span class='def def kw'>def</span> <span class='encode identifier id'>encode</span>
559
- <span class='TYPE constant id'>TYPE</span> <span class='plus op'>+</span> <span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='lbrack token'>[</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='tag identifier id'>tag</span><span class='comma token'>,</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='comma token'>,</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='method identifier id'>method</span><span class='comma token'>,</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='args identifier id'>args</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
560
- <span class='end end kw'>end</span>
561
- </pre>
562
- </td>
563
- </tr>
564
- </table>
565
- </div>
566
-
567
- </div>
568
-
569
- </div>
570
-
571
- <div id="footer">
572
- Generated on Wed Jun 8 18:26:45 2011 by
573
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
574
- 0.6.8 (ruby-1.8.7).
575
- </div>
576
-
577
- </body>
578
- </html>