mack-distributed 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/README +106 -0
  2. data/bin/mack_ring_server +33 -0
  3. data/doc/classes/Mack/Distributable.html +137 -0
  4. data/doc/classes/Mack/Distributed/Errors/ApplicationNameUndefined.html +118 -0
  5. data/doc/classes/Mack/Distributed/Errors/InvalidAddressableURIFormat.html +152 -0
  6. data/doc/classes/Mack/Distributed/Errors/UnknownApplication.html +155 -0
  7. data/doc/classes/Mack/Distributed/Errors/UnknownRouteName.html +156 -0
  8. data/doc/classes/Mack/Distributed/Routes/Urls.html +213 -0
  9. data/doc/classes/Mack/Distributed/Utils/Rinda.html +230 -0
  10. data/doc/classes/Mack/Distributed/View.html +221 -0
  11. data/doc/classes/Mack/Distributed/ViewCache.html +170 -0
  12. data/doc/classes/Mack/Rendering/Type/Distributed.html +173 -0
  13. data/doc/classes/Mack/Rendering/Type/Layout.html +174 -0
  14. data/doc/classes/Mack/Routes/Urls.html +165 -0
  15. data/doc/created.rid +1 -0
  16. data/doc/files/README.html +272 -0
  17. data/doc/files/lib/mack-distributed/distributable_rb.html +101 -0
  18. data/doc/files/lib/mack-distributed/distributed_rb.html +101 -0
  19. data/doc/files/lib/mack-distributed/errors/errors_rb.html +101 -0
  20. data/doc/files/lib/mack-distributed/extensions/route_map_rb.html +101 -0
  21. data/doc/files/lib/mack-distributed/extensions/urls_rb.html +101 -0
  22. data/doc/files/lib/mack-distributed/routes/urls_rb.html +101 -0
  23. data/doc/files/lib/mack-distributed/utils/rinda_rb.html +101 -0
  24. data/doc/files/lib/mack-distributed/views/rendering/type/distributed_rb.html +101 -0
  25. data/doc/files/lib/mack-distributed/views/rendering/type/layout_rb.html +101 -0
  26. data/doc/files/lib/mack-distributed/views/view_cache_rb.html +101 -0
  27. data/doc/files/lib/mack-distributed/views/view_rb.html +101 -0
  28. data/doc/files/lib/mack-distributed_rb.html +110 -0
  29. data/doc/fr_class_index.html +38 -0
  30. data/doc/fr_file_index.html +39 -0
  31. data/doc/fr_method_index.html +43 -0
  32. data/doc/index.html +24 -0
  33. data/doc/rdoc-style.css +208 -0
  34. data/lib/mack-distributed/distributable.rb +68 -0
  35. data/lib/mack-distributed/distributed.rb +24 -0
  36. data/lib/mack-distributed/errors/errors.rb +33 -0
  37. data/lib/mack-distributed/extensions/route_map.rb +26 -0
  38. data/lib/mack-distributed/extensions/urls.rb +32 -0
  39. data/lib/mack-distributed/routes/urls.rb +51 -0
  40. data/lib/mack-distributed/tasks/ring_server_tasks.rake +33 -0
  41. data/lib/mack-distributed/utils/rinda.rb +48 -0
  42. data/lib/mack-distributed/views/rendering/type/distributed.rb +39 -0
  43. data/lib/mack-distributed/views/rendering/type/layout.rb +46 -0
  44. data/lib/mack-distributed/views/view.rb +41 -0
  45. data/lib/mack-distributed/views/view_cache.rb +32 -0
  46. data/lib/mack-distributed.rb +27 -0
  47. metadata +108 -0
data/README ADDED
@@ -0,0 +1,106 @@
1
+ === Setup
2
+
3
+ Using distributed functionality with Mack is incredibly easy. The first thing we need to do is start the Mack ring server.
4
+
5
+ mack_ring_server start
6
+
7
+ That's the glue that holds everything together. The ring server acts a registry/lookup agent so applications know where to find the services they are looking for.
8
+
9
+ In order to use the distributed functionality, you really need two applications. The first application will be serving the distributed object(s), routes, etc... and the second application will be using the distributed functionality. Both applications will need the mack-distributed gem. In the config/initializers/gems.rb add the following to both applications:
10
+
11
+ gem.add "mack-distributed", :libs => "mack-distributed"
12
+
13
+ == Using Distributed Objects (Models)
14
+
15
+ Distributed objects are an easy way to share functionality across many different Mack applications. Whether it's a database model, or a bit of library code, it's easy to share and re-use.
16
+
17
+ === Application #1 (Server)
18
+
19
+ Let's configure our 'server' application. This is where pretty much all the 'heavy lifting' is done. First we need setup our configuration file:
20
+
21
+ config/app_config/default.yml:
22
+ # All distributed applications need to have a unique name so they can easily be identified for lookup.
23
+ mack::distributed_app_name: my_cool_app
24
+ # Turn object sharing on
25
+ mack::share_objects: true
26
+
27
+ Let's assume that we have a simple User DataMapper model that looks something like this:
28
+
29
+ class User
30
+ include DataMapper::Resource
31
+
32
+ property :id, Serial
33
+ property :username, String
34
+ end
35
+
36
+ It takes only one line of code to make that into a distributed object. We just need to include Mack::Distributable into the User class, like such:
37
+
38
+ class User
39
+ include Mack::Distributable
40
+ include DataMapper::Resource
41
+
42
+ property :id, Serial
43
+ property :username, String
44
+ end
45
+
46
+ Now, start your server:
47
+
48
+ rake server
49
+
50
+ === Application #2 (Client)
51
+
52
+ Here's where things get really cool. We don't have to do anything else to our second application to get it find and use our User model from the first application. When we add the mack-distributed gem, we've given it all the magic it needs to run.
53
+
54
+ Let's start up our console:
55
+
56
+ rake console
57
+
58
+ Now, in our console we can do the following:
59
+
60
+ user = Mack::Distributed::User.new
61
+ user.username = "foobar"
62
+ user.save
63
+
64
+ In the first application you'll see an insert into the users table in the logs. If you look in the database, you'll see that we've successfully created a new user.
65
+
66
+ === How does it work?
67
+
68
+ When you include Mack::Distributable into a class it registers a proxy of that class with ring server. When another application makes a call to Mack::Distributed::<class_name> it looks up and finds that class in the ring server and returns the proxy object to you.
69
+
70
+ === Using Distributed Views
71
+ With distributed views, you can easily share views and layouts among different Mack Applications.
72
+
73
+ == Application #1 (Server)
74
+ config/app_config/default.yml:
75
+ mack::distributed_site_domain: http://localhost:3001
76
+ mack::distributed_app_name: my_cool_app
77
+ # Turn view sharing on
78
+ mack::share_views: true
79
+ # and all the model sharing settings...
80
+
81
+ That's it. When the server is started, the distributed view module will register a proxy with rinda ready for use by the client.
82
+
83
+ == Application #2 (Client)
84
+ To use distributed view, you need to specify a fully qualified distributed URI in the form of:
85
+ distributed://app_name/path
86
+ so, let's say I want to render a page using a layout in application 1, I'd do:
87
+ render(:action, "index", :layout => "distributed://my_cool_app/application")
88
+ The above code will render the index page using application.html layout that lives in the application #1 space.
89
+
90
+ You can also specify the distributed layout globally in the controller. Example:
91
+
92
+ class MyController
93
+ include Mack::Controller
94
+
95
+ layout "distributed://my_cool_app/application"
96
+ end
97
+
98
+ All the actions in MyController will use the distributed layout
99
+
100
+ Now, to render a distributed view, you'd do the following:
101
+
102
+ render(:distributed, "distributed://my_cool_app/admin/index")
103
+
104
+ ---------
105
+
106
+ Enjoy!
@@ -0,0 +1,33 @@
1
+ #!/usr/local/bin/ruby
2
+ require 'rubygems'
3
+ require 'daemons'
4
+ require 'rinda/ring'
5
+ require 'rinda/tuplespace'
6
+ require 'fileutils'
7
+ require 'optparse'
8
+ require 'optparse/time'
9
+ require 'ostruct'
10
+
11
+ options = OpenStruct.new
12
+ opts = OptionParser.new do |opts|
13
+ opts.banner = <<-BANNER
14
+ Usage: mack_ring_server <command>
15
+ Available commands are:
16
+
17
+ - start
18
+ - stop
19
+ - restart
20
+
21
+ BANNER
22
+ end
23
+
24
+ opts.parse!(ARGV)
25
+
26
+ FileUtils.mkdir_p(File.join("tmp", "pids"))
27
+
28
+ Daemons.run_proc('mack_ring_server', {:dir_mode => :normal, :dir => File.join("tmp", "pids"), :monitor => true, :multiple => false}) do
29
+ puts 'Starting mack_ring_server...'
30
+ DRb.start_service
31
+ Rinda::RingServer.new(Rinda::TupleSpace.new)
32
+ DRb.thread.join
33
+ end
@@ -0,0 +1,137 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Mack::Distributable</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::Distributable</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mack-distributed/distributable_rb.html">
59
+ lib/mack-distributed/distributable.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ Include this module into any class it will instantly register that class
78
+ with the mack_ring_server. The class will be registered with the name of
79
+ the class and the mack.distributed_app_name configured in your
80
+ config/app_config/*.yml file. If the mack.distributed_app_name
81
+ configuration parameter is nil it will raise an <a
82
+ href="Distributed/Errors/ApplicationNameUndefined.html">Mack::Distributed::Errors::ApplicationNameUndefined</a>
83
+ exception.
84
+ </p>
85
+ <p>
86
+ Example:
87
+ </p>
88
+ <pre>
89
+ class User
90
+ include Mack::Distributable
91
+ def name
92
+ &quot;mark&quot;
93
+ end
94
+ end
95
+
96
+ Mack::Distributed::User.new.name # =&gt; &quot;mark&quot;
97
+ </pre>
98
+
99
+ </div>
100
+
101
+
102
+ </div>
103
+
104
+
105
+ </div>
106
+
107
+
108
+ <!-- if includes -->
109
+ <div id="includes">
110
+ <h3 class="section-bar">Included Modules</h3>
111
+
112
+ <div id="includes-list">
113
+ <span class="include-name">::DRbUndumped</span>
114
+ </div>
115
+ </div>
116
+
117
+ <div id="section">
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+ <!-- if method_list -->
127
+
128
+
129
+ </div>
130
+
131
+
132
+ <div id="validator-badges">
133
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
134
+ </div>
135
+
136
+ </body>
137
+ </html>
@@ -0,0 +1,118 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mack::Distributed::Errors::ApplicationNameUndefined</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mack::Distributed::Errors::ApplicationNameUndefined</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/mack-distributed/errors/errors_rb.html">
59
+ lib/mack-distributed/errors/errors.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ StandardError
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Raised when an application doesn&#8216;t declare it&#8216;s application
84
+ name for use in a distributed system.
85
+ </p>
86
+
87
+ </div>
88
+
89
+
90
+ </div>
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+
109
+
110
+ </div>
111
+
112
+
113
+ <div id="validator-badges">
114
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
115
+ </div>
116
+
117
+ </body>
118
+ </html>
@@ -0,0 +1,152 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mack::Distributed::Errors::InvalidAddressableURIFormat</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mack::Distributed::Errors::InvalidAddressableURIFormat</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/mack-distributed/errors/errors_rb.html">
59
+ lib/mack-distributed/errors/errors.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ StandardError
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Raised when the distributed path is not a well formed addressable format
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000003">inititalize</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+ <div id="methods">
115
+ <h3 class="section-bar">Public Instance methods</h3>
116
+
117
+ <div id="method-M000003" class="method-detail">
118
+ <a name="M000003"></a>
119
+
120
+ <div class="method-heading">
121
+ <a href="#M000003" class="method-signature">
122
+ <span class="method-name">inititalize</span><span class="method-args">(msg)</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p><a class="source-toggle" href="#"
128
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
129
+ <div class="method-source-code" id="M000003-source">
130
+ <pre>
131
+ <span class="ruby-comment cmt"># File lib/mack-distributed/errors/errors.rb, line 27</span>
132
+ 27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inititalize</span>(<span class="ruby-identifier">msg</span>)
133
+ 28: <span class="ruby-keyword kw">super</span>(<span class="ruby-node">&quot;Invalid addressable format: #{msg}&quot;</span>)
134
+ 29: <span class="ruby-keyword kw">end</span>
135
+ </pre>
136
+ </div>
137
+ </div>
138
+ </div>
139
+
140
+
141
+ </div>
142
+
143
+
144
+ </div>
145
+
146
+
147
+ <div id="validator-badges">
148
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
149
+ </div>
150
+
151
+ </body>
152
+ </html>
@@ -0,0 +1,155 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mack::Distributed::Errors::UnknownApplication</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mack::Distributed::Errors::UnknownApplication</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/mack-distributed/errors/errors_rb.html">
59
+ lib/mack-distributed/errors/errors.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ StandardError
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Raised when an unknown distributed application is referenced.
84
+ </p>
85
+
86
+ </div>
87
+
88
+
89
+ </div>
90
+
91
+ <div id="method-list">
92
+ <h3 class="section-bar">Methods</h3>
93
+
94
+ <div class="name-list">
95
+ <a href="#M000005">new</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+ <div id="methods">
115
+ <h3 class="section-bar">Public Class methods</h3>
116
+
117
+ <div id="method-M000005" class="method-detail">
118
+ <a name="M000005"></a>
119
+
120
+ <div class="method-heading">
121
+ <a href="#M000005" class="method-signature">
122
+ <span class="method-name">new</span><span class="method-args">(app_name)</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p>
128
+ Takes the application name.
129
+ </p>
130
+ <p><a class="source-toggle" href="#"
131
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
132
+ <div class="method-source-code" id="M000005-source">
133
+ <pre>
134
+ <span class="ruby-comment cmt"># File lib/mack-distributed/errors/errors.rb, line 8</span>
135
+ 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app_name</span>)
136
+ 9: <span class="ruby-keyword kw">super</span>(<span class="ruby-node">&quot;APPLICATION: #{app_name} is not a known/registered distributed application.&quot;</span>)
137
+ 10: <span class="ruby-keyword kw">end</span>
138
+ </pre>
139
+ </div>
140
+ </div>
141
+ </div>
142
+
143
+
144
+ </div>
145
+
146
+
147
+ </div>
148
+
149
+
150
+ <div id="validator-badges">
151
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
152
+ </div>
153
+
154
+ </body>
155
+ </html>