sprout 1.1.11.pre → 1.1.13.pre

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprout might be problematic. Click here for more details.

Files changed (105) hide show
  1. data/Gemfile.lock +3 -4
  2. data/VERSION +1 -1
  3. data/doc/Dir.html +288 -0
  4. data/doc/Rake/Task.html +184 -0
  5. data/doc/Sprout.html +740 -0
  6. data/doc/Sprout/ArchiveUnpacker.html +1246 -0
  7. data/doc/Sprout/CommandLine.html +520 -0
  8. data/doc/Sprout/Concern.html +351 -0
  9. data/doc/Sprout/Errors.html +101 -0
  10. data/doc/Sprout/Errors/ArchiveUnpackerError.html +125 -0
  11. data/doc/Sprout/Errors/DestinationExistsError.html +133 -0
  12. data/doc/Sprout/Errors/DuplicateMemberError.html +132 -0
  13. data/doc/Sprout/Errors/ExecutableError.html +125 -0
  14. data/doc/Sprout/Errors/ExecutableRegistrationError.html +132 -0
  15. data/doc/Sprout/Errors/ExecutionError.html +121 -0
  16. data/doc/Sprout/Errors/GeneratorError.html +125 -0
  17. data/doc/Sprout/Errors/InvalidArgumentError.html +132 -0
  18. data/doc/Sprout/Errors/LoadError.html +121 -0
  19. data/doc/Sprout/Errors/MissingArgumentError.html +132 -0
  20. data/doc/Sprout/Errors/MissingExecutableError.html +132 -0
  21. data/doc/Sprout/Errors/MissingGeneratorError.html +132 -0
  22. data/doc/Sprout/Errors/MissingTemplateError.html +132 -0
  23. data/doc/Sprout/Errors/ProcessRunnerError.html +121 -0
  24. data/doc/Sprout/Errors/RemoteFileLoaderError.html +110 -0
  25. data/doc/Sprout/Errors/SproutError.html +114 -0
  26. data/doc/Sprout/Errors/UnknownArchiveType.html +122 -0
  27. data/doc/Sprout/Errors/UsageError.html +121 -0
  28. data/doc/Sprout/Errors/ValidationError.html +121 -0
  29. data/doc/Sprout/Errors/VersionRequirementNotMetError.html +121 -0
  30. data/doc/Sprout/Executable.html +169 -0
  31. data/doc/Sprout/Executable/Base.html +2813 -0
  32. data/doc/Sprout/Executable/Boolean.html +534 -0
  33. data/doc/Sprout/Executable/CollectionParam.html +483 -0
  34. data/doc/Sprout/Executable/FileParam.html +484 -0
  35. data/doc/Sprout/Executable/Files.html +292 -0
  36. data/doc/Sprout/Executable/Number.html +141 -0
  37. data/doc/Sprout/Executable/Param.html +2874 -0
  38. data/doc/Sprout/Executable/ParameterFactory.html +232 -0
  39. data/doc/Sprout/Executable/Path.html +223 -0
  40. data/doc/Sprout/Executable/Paths.html +253 -0
  41. data/doc/Sprout/Executable/Session.html +1513 -0
  42. data/doc/Sprout/Executable/StringParam.html +213 -0
  43. data/doc/Sprout/Executable/Strings.html +167 -0
  44. data/doc/Sprout/Executable/Url.html +160 -0
  45. data/doc/Sprout/Executable/Urls.html +170 -0
  46. data/doc/Sprout/FileTarget.html +1109 -0
  47. data/doc/Sprout/Generator.html +750 -0
  48. data/doc/Sprout/Generator/Base.html +1902 -0
  49. data/doc/Sprout/Generator/Command.html +690 -0
  50. data/doc/Sprout/Generator/DirectoryManifest.html +476 -0
  51. data/doc/Sprout/Generator/FileManifest.html +643 -0
  52. data/doc/Sprout/Generator/Manifest.html +377 -0
  53. data/doc/Sprout/Generator/TemplateManifest.html +194 -0
  54. data/doc/Sprout/GeneratorGenerator.html +1115 -0
  55. data/doc/Sprout/Library.html +1146 -0
  56. data/doc/Sprout/LibraryGenerator.html +331 -0
  57. data/doc/Sprout/OutputBuffer.html +445 -0
  58. data/doc/Sprout/Platform.html +714 -0
  59. data/doc/Sprout/ProcessRunner.html +1707 -0
  60. data/doc/Sprout/ProgressBar.html +366 -0
  61. data/doc/Sprout/ProgressBarImpl.html +2109 -0
  62. data/doc/Sprout/ProgressBarManager.html +424 -0
  63. data/doc/Sprout/ProgressBarOutputStream.html +406 -0
  64. data/doc/Sprout/RDocParser.html +211 -0
  65. data/doc/Sprout/RemoteFileLoader.html +172 -0
  66. data/doc/Sprout/RemoteFileTarget.html +679 -0
  67. data/doc/Sprout/ReversedProgressBar.html +184 -0
  68. data/doc/Sprout/RubyFeature.html +155 -0
  69. data/doc/Sprout/RubyFeature/ClassMethods.html +1065 -0
  70. data/doc/Sprout/RubyGenerator.html +786 -0
  71. data/doc/Sprout/Specification.html +767 -0
  72. data/doc/Sprout/System.html +191 -0
  73. data/doc/Sprout/System/BaseSystem.html +1660 -0
  74. data/doc/Sprout/System/JavaSystem.html +122 -0
  75. data/doc/Sprout/System/OSXSystem.html +335 -0
  76. data/doc/Sprout/System/ThreadMock.html +183 -0
  77. data/doc/Sprout/System/UnixSystem.html +584 -0
  78. data/doc/Sprout/System/VistaSystem.html +251 -0
  79. data/doc/Sprout/System/WinNixSystem.html +325 -0
  80. data/doc/Sprout/System/WinSystem.html +571 -0
  81. data/doc/Sprout/TestHelper.html +2165 -0
  82. data/doc/Sprout/ToolGenerator.html +953 -0
  83. data/doc/Sprout/VERSION.html +118 -0
  84. data/doc/String.html +290 -0
  85. data/doc/_index.html +820 -0
  86. data/doc/class_list.html +36 -0
  87. data/doc/css/common.css +1 -0
  88. data/doc/css/full_list.css +53 -0
  89. data/doc/css/style.css +310 -0
  90. data/doc/file.README.html +96 -0
  91. data/doc/file_list.html +41 -0
  92. data/doc/frames.html +13 -0
  93. data/doc/index.html +96 -0
  94. data/doc/js/app.js +202 -0
  95. data/doc/js/full_list.js +149 -0
  96. data/doc/js/jquery.js +154 -0
  97. data/doc/method_list.html +3603 -0
  98. data/doc/top-level-namespace.html +192 -0
  99. data/lib/sprout.rb +1 -0
  100. data/lib/sprout/executable/base.rb +2 -5
  101. data/lib/sprout/executable/param.rb +15 -8
  102. data/lib/sprout/executable/session.rb +1 -1
  103. data/lib/sprout/library.rb +44 -2
  104. data/test/unit/executable_test.rb +3 -5
  105. metadata +99 -3
@@ -0,0 +1,184 @@
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 name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Class: Sprout::ReversedProgressBar</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 (R)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../Sprout.html" title="Sprout (module)">Sprout</a></span></span>
28
+ &raquo;
29
+ <span class="title">ReversedProgressBar</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: Sprout::ReversedProgressBar
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"><span class='object_link'><a href="ProgressBar.html" title="Sprout::ProgressBar (class)">ProgressBar</a></span></span>
57
+
58
+ <ul class="fullTree">
59
+ <li>Object</li>
60
+
61
+ <li class="next"><span class='object_link'><a href="ProgressBar.html" title="Sprout::ProgressBar (class)">ProgressBar</a></span></li>
62
+
63
+ <li class="next">Sprout::ReversedProgressBar</li>
64
+
65
+ </ul>
66
+ <a href="#" class="inheritanceTree">show all</a>
67
+
68
+ </dd>
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+ <dt class="r2 last">Defined in:</dt>
79
+ <dd class="r2 last">lib/sprout/progress_bar.rb</dd>
80
+
81
+ </dl>
82
+ <div class="clear"></div>
83
+
84
+
85
+ <h2>Constant Summary</h2>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+ <h3 class="inherited">Constants inherited from <span class='object_link'><a href="ProgressBar.html" title="Sprout::ProgressBar (class)">ProgressBar</a></span></h3>
94
+ <p class="inherited"><span class='object_link'><a href="ProgressBar.html#VERSION-constant" title="Sprout::ProgressBar::VERSION (constant)">VERSION</a></span></p>
95
+
96
+
97
+
98
+ <h2>
99
+ Instance Method Summary
100
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
101
+ </h2>
102
+
103
+ <ul class="summary">
104
+
105
+ <li class="public ">
106
+ <span class="summary_signature">
107
+
108
+ <a href="#do_percentage-instance_method" title="#do_percentage (instance method)">- (Object) <strong>do_percentage</strong> </a>
109
+
110
+
111
+
112
+ </span>
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <span class="summary_desc"><div class='inline'></div></span>
122
+
123
+ </li>
124
+
125
+
126
+ </ul>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ProgressBar.html" title="Sprout::ProgressBar (class)">ProgressBar</a></span></h3>
138
+ <p class="inherited"><span class='object_link'><a href="ProgressBar.html#debug%3D-class_method" title="Sprout::ProgressBar.debug= (method)">debug=</a></span>, <span class='object_link'><a href="ProgressBar.html#debug%3F-class_method" title="Sprout::ProgressBar.debug? (method)">debug?</a></span>, <span class='object_link'><a href="ProgressBar.html#new-class_method" title="Sprout::ProgressBar.new (method)">new</a></span>, <span class='object_link'><a href="ProgressBar.html#outio-class_method" title="Sprout::ProgressBar.outio (method)">outio</a></span></p>
139
+
140
+
141
+ <div id="instance_method_details" class="method_details_list">
142
+ <h2>Instance Method Details</h2>
143
+
144
+
145
+ <div class="method_details first">
146
+ <p class="signature first" id="do_percentage-instance_method">
147
+
148
+ - (<tt>Object</tt>) <strong>do_percentage</strong>
149
+
150
+
151
+
152
+ </p><table class="source_code">
153
+ <tr>
154
+ <td>
155
+ <pre class="lines">
156
+
157
+
158
+ 269
159
+ 270
160
+ 271</pre>
161
+ </td>
162
+ <td>
163
+ <pre class="code"><span class="info file"># File 'lib/sprout/progress_bar.rb', line 269</span>
164
+
165
+ <span class='kw'>def</span> <span class='id do_percentage'>do_percentage</span>
166
+ <span class='int'>100</span> <span class='op'>-</span> <span class='kw'>super</span>
167
+ <span class='kw'>end</span></pre>
168
+ </td>
169
+ </tr>
170
+ </table>
171
+ </div>
172
+
173
+ </div>
174
+
175
+ </div>
176
+
177
+ <div id="footer">
178
+ Generated on Fri Apr 29 18:33:06 2011 by
179
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
180
+ 0.6.3 (ruby-1.9.2).
181
+ </div>
182
+
183
+ </body>
184
+ </html>
@@ -0,0 +1,155 @@
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 name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: Sprout::RubyFeature</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 (R)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../Sprout.html" title="Sprout (module)">Sprout</a></span></span>
28
+ &raquo;
29
+ <span class="title">RubyFeature</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: Sprout::RubyFeature
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+
55
+
56
+ <dt class="r1">Extended by:</dt>
57
+ <dd class="r1"><span class='object_link'><a href="Concern.html" title="Sprout::Concern (module)">Concern</a></span></dd>
58
+
59
+
60
+
61
+
62
+
63
+
64
+ <dt class="r2">Included in:</dt>
65
+ <dd class="r2"><span class='object_link'><a href="Executable.html" title="Sprout::Executable (module)">Executable</a></span>, <span class='object_link'><a href="Generator.html" title="Sprout::Generator (module)">Generator</a></span>, <span class='object_link'><a href="Library.html" title="Sprout::Library (class)">Library</a></span></dd>
66
+
67
+
68
+
69
+ <dt class="r1 last">Defined in:</dt>
70
+ <dd class="r1 last">lib/sprout/ruby_feature.rb</dd>
71
+
72
+ </dl>
73
+ <div class="clear"></div>
74
+
75
+ <h2>Overview</h2><div class="docstring">
76
+ <div class="discussion">
77
+
78
+ <p>This class represents a Feature that is written in Ruby code that exists on
79
+ the other side of the Ruby load path.</p>
80
+
81
+ <p>The idea here, is that one can <tt>include</tt> the Sprout::RubyFeature
82
+ module into their concrete class, and then accept requests to
83
+ <tt>register</tt> and <tt>load</tt> from clients that are interested in
84
+ pluggable features.</p>
85
+
86
+ <p>An example is as follows:</p>
87
+
88
+ <pre class="code"><span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sprout</span><span class='tstring_end'>'</span></span>
89
+
90
+ <span class='kw'>class</span> <span class='const'>MyClass</span>
91
+ <span class='id include'>include</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>RubyFeature</span>
92
+ <span class='kw'>end</span></pre>
93
+
94
+ <p>In some other Ruby file:</p>
95
+
96
+ <pre class="code"><span class='const'>MyClass</span><span class='period'>.</span><span class='id load'>load</span> <span class='symbol'>:other</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>other_gem</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>&gt;= 1.0pre</span><span class='tstring_end'>'</span></span></pre>
97
+
98
+ <p>In the desired Ruby file:</p>
99
+
100
+ <pre class="code"><span class='kw'>class</span> <span class='const'>OtherClass</span>
101
+ <span class='id include'>include</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Executable</span>
102
+
103
+ <span class='id set'>set</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:other</span>
104
+ <span class='id set'>set</span> <span class='symbol'>:pkg_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>other_gem</span><span class='tstring_end'>'</span></span>
105
+ <span class='id set'>set</span> <span class='symbol'>:pkg_version</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1.0.pre</span><span class='tstring_end'>'</span></span>
106
+
107
+ <span class='comment'># do something...
108
+ </span><span class='kw'>end</span>
109
+
110
+ <span class='const'>MyClass</span><span class='period'>.</span><span class='id register'>register</span> <span class='const'>OtherClass</span><span class='period'>.</span><span class='id new'>new</span></pre>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+ </div><h2>Defined Under Namespace</h2>
118
+ <p class="children">
119
+
120
+
121
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="RubyFeature/ClassMethods.html" title="Sprout::RubyFeature::ClassMethods (module)">ClassMethods</a></span>
122
+
123
+
124
+
125
+
126
+ </p>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <h2>Method Summary</h2>
141
+
142
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Concern.html" title="Sprout::Concern (module)">Concern</a></span></h3>
143
+ <p class="inherited"><span class='object_link'><a href="Concern.html#append_features-instance_method" title="Sprout::Concern#append_features (method)">append_features</a></span>, <span class='object_link'><a href="Concern.html#extended-class_method" title="Sprout::Concern.extended (method)">extended</a></span>, <span class='object_link'><a href="Concern.html#included-instance_method" title="Sprout::Concern#included (method)">included</a></span></p>
144
+
145
+
146
+ </div>
147
+
148
+ <div id="footer">
149
+ Generated on Fri Apr 29 18:33:06 2011 by
150
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
151
+ 0.6.3 (ruby-1.9.2).
152
+ </div>
153
+
154
+ </body>
155
+ </html>
@@ -0,0 +1,1065 @@
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 name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: Sprout::RubyFeature::ClassMethods</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="../../Sprout.html" title="Sprout (module)">Sprout</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../RubyFeature.html" title="Sprout::RubyFeature (module)">RubyFeature</a></span></span>
28
+ &raquo;
29
+ <span class="title">ClassMethods</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: Sprout::RubyFeature::ClassMethods
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/sprout/ruby_feature.rb</dd>
63
+
64
+ </dl>
65
+ <div class="clear"></div>
66
+
67
+
68
+
69
+
70
+
71
+ <h2>
72
+ Instance Method Summary
73
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
74
+ </h2>
75
+
76
+ <ul class="summary">
77
+
78
+ <li class="public ">
79
+ <span class="summary_signature">
80
+
81
+ <a href="#clear_entities%21-instance_method" title="#clear_entities! (instance method)">- (Object) <strong>clear_entities!</strong> </a>
82
+
83
+
84
+
85
+ </span>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <span class="summary_desc"><div class='inline'></div></span>
95
+
96
+ </li>
97
+
98
+
99
+ <li class="protected ">
100
+ <span class="summary_signature">
101
+
102
+ <a href="#entity_for-instance_method" title="#entity_for (instance method)">- (Object) <strong>entity_for</strong>(name_or_names, pkg_name, version_requirement) </a>
103
+
104
+
105
+
106
+ </span>
107
+
108
+
109
+ <span class="note title protected">protected</span>
110
+
111
+
112
+
113
+
114
+
115
+ <span class="summary_desc"><div class='inline'></div></span>
116
+
117
+ </li>
118
+
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#load-instance_method" title="#load (instance method)">- (Object) <strong>load</strong>(name_or_names, pkg_name = nil, version_requirement = nil) </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'>
137
+ <p>Load a feature by name.</p>
138
+ </div></span>
139
+
140
+ </li>
141
+
142
+
143
+ <li class="public ">
144
+ <span class="summary_signature">
145
+
146
+ <a href="#register-instance_method" title="#register (instance method)">- (Object) <strong>register</strong>(entity) </a>
147
+
148
+
149
+
150
+ </span>
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>Register a new feature for future lookups.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ <li class="protected ">
167
+ <span class="summary_signature">
168
+
169
+ <a href="#registered_entities-instance_method" title="#registered_entities (instance method)">- (Object) <strong>registered_entities</strong> </a>
170
+
171
+
172
+
173
+ </span>
174
+
175
+
176
+ <span class="note title protected">protected</span>
177
+
178
+
179
+
180
+
181
+
182
+ <span class="summary_desc"><div class='inline'>
183
+ <p>An entity has the following parameters: name pkg_name pkg_version platform.</p>
184
+ </div></span>
185
+
186
+ </li>
187
+
188
+
189
+ <li class="protected ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#require_ruby_package-instance_method" title="#require_ruby_package (instance method)">- (Object) <strong>require_ruby_package</strong>(name) </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+ <span class="note title protected">protected</span>
200
+
201
+
202
+
203
+
204
+
205
+ <span class="summary_desc"><div class='inline'></div></span>
206
+
207
+ </li>
208
+
209
+
210
+ <li class="protected ">
211
+ <span class="summary_signature">
212
+
213
+ <a href="#resolve_file_target-instance_method" title="#resolve_file_target (instance method)">- (Object) <strong>resolve_file_target</strong>(entity) </a>
214
+
215
+
216
+
217
+ </span>
218
+
219
+
220
+ <span class="note title protected">protected</span>
221
+
222
+
223
+
224
+
225
+
226
+ <span class="summary_desc"><div class='inline'></div></span>
227
+
228
+ </li>
229
+
230
+
231
+ <li class="protected ">
232
+ <span class="summary_signature">
233
+
234
+ <a href="#satisfies_environment%3F-instance_method" title="#satisfies_environment? (instance method)">- (Boolean) <strong>satisfies_environment?</strong>(entity, environment) </a>
235
+
236
+
237
+
238
+ </span>
239
+
240
+
241
+ <span class="note title protected">protected</span>
242
+
243
+
244
+
245
+
246
+
247
+ <span class="summary_desc"><div class='inline'></div></span>
248
+
249
+ </li>
250
+
251
+
252
+ <li class="protected ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#satisfies_name%3F-instance_method" title="#satisfies_name? (instance method)">- (Boolean) <strong>satisfies_name?</strong>(entity, expected) </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+ <span class="note title protected">protected</span>
263
+
264
+
265
+
266
+
267
+
268
+ <span class="summary_desc"><div class='inline'></div></span>
269
+
270
+ </li>
271
+
272
+
273
+ <li class="protected ">
274
+ <span class="summary_signature">
275
+
276
+ <a href="#satisfies_pkg_name%3F-instance_method" title="#satisfies_pkg_name? (instance method)">- (Boolean) <strong>satisfies_pkg_name?</strong>(entity, expected) </a>
277
+
278
+
279
+
280
+ </span>
281
+
282
+
283
+ <span class="note title protected">protected</span>
284
+
285
+
286
+
287
+
288
+
289
+ <span class="summary_desc"><div class='inline'></div></span>
290
+
291
+ </li>
292
+
293
+
294
+ <li class="protected ">
295
+ <span class="summary_signature">
296
+
297
+ <a href="#satisfies_platform%3F-instance_method" title="#satisfies_platform? (instance method)">- (Boolean) <strong>satisfies_platform?</strong>(entity) </a>
298
+
299
+
300
+
301
+ </span>
302
+
303
+
304
+ <span class="note title protected">protected</span>
305
+
306
+
307
+
308
+
309
+
310
+ <span class="summary_desc"><div class='inline'></div></span>
311
+
312
+ </li>
313
+
314
+
315
+ <li class="protected ">
316
+ <span class="summary_signature">
317
+
318
+ <a href="#satisfies_version%3F-instance_method" title="#satisfies_version? (instance method)">- (Boolean) <strong>satisfies_version?</strong>(entity, version_requirement = nil) </a>
319
+
320
+
321
+
322
+ </span>
323
+
324
+
325
+ <span class="note title protected">protected</span>
326
+
327
+
328
+
329
+
330
+
331
+ <span class="summary_desc"><div class='inline'></div></span>
332
+
333
+ </li>
334
+
335
+
336
+ <li class="protected ">
337
+ <span class="summary_signature">
338
+
339
+ <a href="#update_registered_entities-instance_method" title="#update_registered_entities (instance method)">- (Object) <strong>update_registered_entities</strong> </a>
340
+
341
+
342
+
343
+ </span>
344
+
345
+
346
+ <span class="note title protected">protected</span>
347
+
348
+
349
+
350
+
351
+
352
+ <span class="summary_desc"><div class='inline'>
353
+ <p>Used by the Generator::Base to update inputs from empty class definitions
354
+ to instances..</p>
355
+ </div></span>
356
+
357
+ </li>
358
+
359
+
360
+ <li class="protected ">
361
+ <span class="summary_signature">
362
+
363
+ <a href="#validate_registration-instance_method" title="#validate_registration (instance method)">- (Object) <strong>validate_registration</strong>(entity) </a>
364
+
365
+
366
+
367
+ </span>
368
+
369
+
370
+ <span class="note title protected">protected</span>
371
+
372
+
373
+
374
+
375
+
376
+ <span class="summary_desc"><div class='inline'></div></span>
377
+
378
+ </li>
379
+
380
+
381
+ </ul>
382
+
383
+
384
+
385
+
386
+ <div id="instance_method_details" class="method_details_list">
387
+ <h2>Instance Method Details</h2>
388
+
389
+
390
+ <div class="method_details first">
391
+ <p class="signature first" id="clear_entities!-instance_method">
392
+
393
+ - (<tt>Object</tt>) <strong>clear_entities!</strong>
394
+
395
+
396
+
397
+ </p><table class="source_code">
398
+ <tr>
399
+ <td>
400
+ <pre class="lines">
401
+
402
+
403
+ 84
404
+ 85
405
+ 86</pre>
406
+ </td>
407
+ <td>
408
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 84</span>
409
+
410
+ <span class='kw'>def</span> <span class='id clear_entities!'>clear_entities!</span>
411
+ <span class='ivar'>@registered_entities</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
412
+ <span class='kw'>end</span></pre>
413
+ </td>
414
+ </tr>
415
+ </table>
416
+ </div>
417
+
418
+ <div class="method_details ">
419
+ <p class="signature " id="entity_for-instance_method">
420
+
421
+ - (<tt>Object</tt>) <strong>entity_for</strong>(name_or_names, pkg_name, version_requirement) <span class="extras">(protected)</span>
422
+
423
+
424
+
425
+ </p><table class="source_code">
426
+ <tr>
427
+ <td>
428
+ <pre class="lines">
429
+
430
+
431
+ 113
432
+ 114
433
+ 115
434
+ 116
435
+ 117
436
+ 118
437
+ 119
438
+ 120
439
+ 121
440
+ 122
441
+ 123
442
+ 124
443
+ 125
444
+ 126
445
+ 127</pre>
446
+ </td>
447
+ <td>
448
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 113</span>
449
+
450
+ <span class='kw'>def</span> <span class='id entity_for'>entity_for</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span>
451
+ <span class='comment'># These commented blocks help immensely when debugging
452
+ </span> <span class='comment'># loading and registration issues, please leave them here:
453
+ </span> <span class='comment'>#puts &quot;+++++++++++++++++++++++++++&quot;
454
+ </span> <span class='comment'>#puts &quot;&gt;&gt; entity_for #{name_or_names} pkg_name: #{pkg_name} version: #{version_requirement}&quot;
455
+ </span> <span class='comment'>#registered_entities.each do |entity|
456
+ </span> <span class='comment'>#puts &quot;&gt;&gt; entity: #{entity.name} platform: #{entity.platform} pkg_name: #{entity.pkg_name} version: #{entity.pkg_version}&quot;
457
+ </span> <span class='comment'>#end
458
+ </span> <span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id reverse'>reverse</span><span class='period'>.</span><span class='id select'>select</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id entity'>entity</span><span class='op'>|</span>
459
+ <span class='id satisfies_name?'>satisfies_name?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='comma'>,</span> <span class='id name_or_names'>name_or_names</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
460
+ <span class='id satisfies_platform?'>satisfies_platform?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
461
+ <span class='id satisfies_pkg_name?'>satisfies_pkg_name?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
462
+ <span class='id satisfies_version?'>satisfies_version?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span><span class='rparen'>)</span>
463
+ <span class='kw'>end</span><span class='period'>.</span><span class='id first'>first</span>
464
+ <span class='kw'>end</span></pre>
465
+ </td>
466
+ </tr>
467
+ </table>
468
+ </div>
469
+
470
+ <div class="method_details ">
471
+ <p class="signature " id="load-instance_method">
472
+
473
+ - (<tt>Object</tt>) <strong>load</strong>(name_or_names, pkg_name = nil, version_requirement = nil)
474
+
475
+
476
+
477
+ </p><div class="docstring">
478
+ <div class="discussion">
479
+
480
+ <p>Load a feature by name.</p>
481
+
482
+
483
+ </div>
484
+ </div>
485
+ <div class="tags">
486
+
487
+ </div><table class="source_code">
488
+ <tr>
489
+ <td>
490
+ <pre class="lines">
491
+
492
+
493
+ 56
494
+ 57
495
+ 58
496
+ 59
497
+ 60
498
+ 61
499
+ 62
500
+ 63
501
+ 64
502
+ 65
503
+ 66
504
+ 67
505
+ 68
506
+ 69
507
+ 70
508
+ 71
509
+ 72
510
+ 73
511
+ 74
512
+ 75
513
+ 76
514
+ 77
515
+ 78
516
+ 79
517
+ 80
518
+ 81
519
+ 82</pre>
520
+ </td>
521
+ <td>
522
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 56</span>
523
+
524
+ <span class='kw'>def</span> <span class='id load'>load</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span><span class='op'>=</span><span class='kw'>nil</span>
525
+ <span class='id entity'>entity</span> <span class='op'>=</span> <span class='id entity_for'>entity_for</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span>
526
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span>
527
+ <span class='comment'># Try to require the pkg_name:
528
+ </span> <span class='id require_ruby_package'>require_ruby_package</span> <span class='id pkg_name'>pkg_name</span> <span class='kw'>unless</span> <span class='id pkg_name'>pkg_name</span><span class='period'>.</span><span class='id nil?'>nil?</span>
529
+ <span class='comment'># Update any entities that registered from our require:
530
+ </span> <span class='id update_registered_entities'>update_registered_entities</span>
531
+ <span class='comment'># search for the requested entity:
532
+ </span> <span class='id entity'>entity</span> <span class='op'>=</span> <span class='id entity_for'>entity_for</span> <span class='id name_or_names'>name_or_names</span><span class='comma'>,</span> <span class='id pkg_name'>pkg_name</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span>
533
+ <span class='kw'>end</span>
534
+
535
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span>
536
+ <span class='id message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>The requested entity: (</span><span class='embexpr_beg'>#{</span><span class='id name_or_names'>name_or_names</span><span class='rbrace'>}</span><span class='tstring_content'>) with pkg_name: (</span><span class='embexpr_beg'>#{</span><span class='id pkg_name'>pkg_name</span><span class='rbrace'>}</span><span class='tstring_content'>) and version: </span><span class='tstring_end'>&quot;</span></span>
537
+ <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='id version_requirement'>version_requirement</span><span class='rbrace'>}</span><span class='tstring_content'>) does not appear to be loaded.</span><span class='tstring_end'>&quot;</span></span>
538
+ <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
539
+ <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>We did find (</span><span class='embexpr_beg'>#{</span><span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id size'>size</span><span class='rbrace'>}</span><span class='tstring_content'>) registered entities in that package:\n\n</span><span class='tstring_end'>&quot;</span></span>
540
+ <span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id other'>other</span><span class='op'>|</span>
541
+ <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>&gt;&gt; name: (</span><span class='embexpr_beg'>#{</span><span class='id other'>other</span><span class='period'>.</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>) pkg_name: (</span><span class='embexpr_beg'>#{</span><span class='id other'>other</span><span class='period'>.</span><span class='id pkg_name'>pkg_name</span><span class='rbrace'>}</span><span class='tstring_content'>) pkg_version: (</span><span class='embexpr_beg'>#{</span><span class='id other'>other</span><span class='period'>.</span><span class='id pkg_version'>pkg_version</span><span class='rbrace'>}</span><span class='tstring_content'>)\n</span><span class='tstring_end'>&quot;</span></span>
542
+ <span class='kw'>end</span>
543
+ <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n\nYou may need to update your Gemfile and run 'bundle install' </span><span class='tstring_end'>&quot;</span></span>
544
+ <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>to update your local gems.\n\n</span><span class='tstring_end'>&quot;</span></span>
545
+ <span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>LoadError</span><span class='period'>.</span><span class='id new'>new</span> <span class='id message'>message</span>
546
+ <span class='kw'>end</span>
547
+
548
+ <span class='id resolve_file_target'>resolve_file_target</span> <span class='id entity'>entity</span>
549
+ <span class='id entity'>entity</span>
550
+ <span class='kw'>end</span></pre>
551
+ </td>
552
+ </tr>
553
+ </table>
554
+ </div>
555
+
556
+ <div class="method_details ">
557
+ <p class="signature " id="register-instance_method">
558
+
559
+ - (<tt>Object</tt>) <strong>register</strong>(entity)
560
+
561
+
562
+
563
+ </p><div class="docstring">
564
+ <div class="discussion">
565
+
566
+ <p>Register a new feature for future lookups</p>
567
+
568
+
569
+ </div>
570
+ </div>
571
+ <div class="tags">
572
+
573
+ </div><table class="source_code">
574
+ <tr>
575
+ <td>
576
+ <pre class="lines">
577
+
578
+
579
+ 48
580
+ 49
581
+ 50
582
+ 51
583
+ 52</pre>
584
+ </td>
585
+ <td>
586
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 48</span>
587
+
588
+ <span class='kw'>def</span> <span class='id register'>register</span> <span class='id entity'>entity</span>
589
+ <span class='id validate_registration'>validate_registration</span> <span class='id entity'>entity</span>
590
+ <span class='id registered_entities'>registered_entities</span><span class='period'>.</span><span class='id unshift'>unshift</span> <span class='id entity'>entity</span>
591
+ <span class='id entity'>entity</span>
592
+ <span class='kw'>end</span></pre>
593
+ </td>
594
+ </tr>
595
+ </table>
596
+ </div>
597
+
598
+ <div class="method_details ">
599
+ <p class="signature " id="registered_entities-instance_method">
600
+
601
+ - (<tt>Object</tt>) <strong>registered_entities</strong> <span class="extras">(protected)</span>
602
+
603
+
604
+
605
+ </p><div class="docstring">
606
+ <div class="discussion">
607
+
608
+ <p>An entity has the following parameters: name pkg_name pkg_version platform</p>
609
+
610
+
611
+ </div>
612
+ </div>
613
+ <div class="tags">
614
+
615
+ </div><table class="source_code">
616
+ <tr>
617
+ <td>
618
+ <pre class="lines">
619
+
620
+
621
+ 177
622
+ 178
623
+ 179</pre>
624
+ </td>
625
+ <td>
626
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 177</span>
627
+
628
+ <span class='kw'>def</span> <span class='id registered_entities'>registered_entities</span>
629
+ <span class='ivar'>@registered_entities</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
630
+ <span class='kw'>end</span></pre>
631
+ </td>
632
+ </tr>
633
+ </table>
634
+ </div>
635
+
636
+ <div class="method_details ">
637
+ <p class="signature " id="require_ruby_package-instance_method">
638
+
639
+ - (<tt>Object</tt>) <strong>require_ruby_package</strong>(name) <span class="extras">(protected)</span>
640
+
641
+
642
+
643
+ </p><table class="source_code">
644
+ <tr>
645
+ <td>
646
+ <pre class="lines">
647
+
648
+
649
+ 162
650
+ 163
651
+ 164
652
+ 165
653
+ 166
654
+ 167
655
+ 168</pre>
656
+ </td>
657
+ <td>
658
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 162</span>
659
+
660
+ <span class='kw'>def</span> <span class='id require_ruby_package'>require_ruby_package</span> <span class='id name'>name</span>
661
+ <span class='kw'>begin</span>
662
+ <span class='id require'>require</span> <span class='id name'>name</span><span class='period'>.</span><span class='id to_s'>to_s</span>
663
+ <span class='kw'>rescue</span> <span class='const'>LoadError</span> <span class='op'>=&gt;</span> <span class='id e'>e</span>
664
+ <span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>LoadError</span><span class='period'>.</span><span class='id new'>new</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Could not load the required file (</span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>) - Maybe you need to run 'gem install </span><span class='embexpr_beg'>#{</span><span class='id name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>' or maybe 'bundle install'?</span><span class='tstring_end'>&quot;</span></span>
665
+ <span class='kw'>end</span>
666
+ <span class='kw'>end</span></pre>
667
+ </td>
668
+ </tr>
669
+ </table>
670
+ </div>
671
+
672
+ <div class="method_details ">
673
+ <p class="signature " id="resolve_file_target-instance_method">
674
+
675
+ - (<tt>Object</tt>) <strong>resolve_file_target</strong>(entity) <span class="extras">(protected)</span>
676
+
677
+
678
+
679
+ </p><table class="source_code">
680
+ <tr>
681
+ <td>
682
+ <pre class="lines">
683
+
684
+
685
+ 90
686
+ 91
687
+ 92
688
+ 93
689
+ 94
690
+ 95
691
+ 96
692
+ 97
693
+ 98
694
+ 99</pre>
695
+ </td>
696
+ <td>
697
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 90</span>
698
+
699
+ <span class='kw'>def</span> <span class='id resolve_file_target'>resolve_file_target</span> <span class='id entity'>entity</span>
700
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span> <span class='symbol'>:resolve</span><span class='rparen'>)</span>
701
+ <span class='id entity'>entity</span><span class='period'>.</span><span class='id resolve'>resolve</span>
702
+ <span class='kw'>elsif</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span> <span class='symbol'>:file_target</span><span class='rparen'>)</span>
703
+ <span class='id file_target'>file_target</span> <span class='op'>=</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id file_target'>file_target</span>
704
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='id file_target'>file_target</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span> <span class='symbol'>:resolve</span><span class='rparen'>)</span>
705
+ <span class='id file_target'>file_target</span><span class='period'>.</span><span class='id resolve'>resolve</span>
706
+ <span class='kw'>end</span>
707
+ <span class='kw'>end</span>
708
+ <span class='kw'>end</span></pre>
709
+ </td>
710
+ </tr>
711
+ </table>
712
+ </div>
713
+
714
+ <div class="method_details ">
715
+ <p class="signature " id="satisfies_environment?-instance_method">
716
+
717
+ - (<tt>Boolean</tt>) <strong>satisfies_environment?</strong>(entity, environment) <span class="extras">(protected)</span>
718
+
719
+
720
+
721
+ </p><div class="docstring">
722
+ <div class="discussion">
723
+
724
+
725
+ </div>
726
+ </div>
727
+ <div class="tags">
728
+ <h3>Returns:</h3>
729
+ <ul class="return">
730
+
731
+ <li>
732
+
733
+ <span class='type'>(<tt>Boolean</tt>)</span>
734
+
735
+
736
+
737
+
738
+ </li>
739
+
740
+ </ul>
741
+
742
+ </div><table class="source_code">
743
+ <tr>
744
+ <td>
745
+ <pre class="lines">
746
+
747
+
748
+ 129
749
+ 130
750
+ 131
751
+ 132</pre>
752
+ </td>
753
+ <td>
754
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 129</span>
755
+
756
+ <span class='kw'>def</span> <span class='id satisfies_environment?'>satisfies_environment?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id environment'>environment</span>
757
+ <span class='comment'>#puts &quot;&gt;&gt; env: #{entity.environment} vs. #{environment}&quot;
758
+ </span> <span class='id environment'>environment</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:environment</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id environment'>environment</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='op'>==</span> <span class='id environment'>environment</span><span class='period'>.</span><span class='id to_s'>to_s</span>
759
+ <span class='kw'>end</span></pre>
760
+ </td>
761
+ </tr>
762
+ </table>
763
+ </div>
764
+
765
+ <div class="method_details ">
766
+ <p class="signature " id="satisfies_name?-instance_method">
767
+
768
+ - (<tt>Boolean</tt>) <strong>satisfies_name?</strong>(entity, expected) <span class="extras">(protected)</span>
769
+
770
+
771
+
772
+ </p><div class="docstring">
773
+ <div class="discussion">
774
+
775
+
776
+ </div>
777
+ </div>
778
+ <div class="tags">
779
+ <h3>Returns:</h3>
780
+ <ul class="return">
781
+
782
+ <li>
783
+
784
+ <span class='type'>(<tt>Boolean</tt>)</span>
785
+
786
+
787
+
788
+
789
+ </li>
790
+
791
+ </ul>
792
+
793
+ </div><table class="source_code">
794
+ <tr>
795
+ <td>
796
+ <pre class="lines">
797
+
798
+
799
+ 139
800
+ 140
801
+ 141
802
+ 142
803
+ 143
804
+ 144
805
+ 145
806
+ 146</pre>
807
+ </td>
808
+ <td>
809
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 139</span>
810
+
811
+ <span class='kw'>def</span> <span class='id satisfies_name?'>satisfies_name?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id expected'>expected</span>
812
+ <span class='comment'>#puts &quot;&gt;&gt; name: #{entity.name} vs. #{expected}&quot;
813
+ </span> <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:name</span><span class='rparen'>)</span>
814
+ <span class='kw'>if</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
815
+ <span class='kw'>return</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id include?'>include?</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id name'>name</span>
816
+ <span class='kw'>end</span>
817
+ <span class='kw'>return</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='op'>==</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id name'>name</span><span class='period'>.</span><span class='id to_s'>to_s</span>
818
+ <span class='kw'>end</span></pre>
819
+ </td>
820
+ </tr>
821
+ </table>
822
+ </div>
823
+
824
+ <div class="method_details ">
825
+ <p class="signature " id="satisfies_pkg_name?-instance_method">
826
+
827
+ - (<tt>Boolean</tt>) <strong>satisfies_pkg_name?</strong>(entity, expected) <span class="extras">(protected)</span>
828
+
829
+
830
+
831
+ </p><div class="docstring">
832
+ <div class="discussion">
833
+
834
+
835
+ </div>
836
+ </div>
837
+ <div class="tags">
838
+ <h3>Returns:</h3>
839
+ <ul class="return">
840
+
841
+ <li>
842
+
843
+ <span class='type'>(<tt>Boolean</tt>)</span>
844
+
845
+
846
+
847
+
848
+ </li>
849
+
850
+ </ul>
851
+
852
+ </div><table class="source_code">
853
+ <tr>
854
+ <td>
855
+ <pre class="lines">
856
+
857
+
858
+ 134
859
+ 135
860
+ 136
861
+ 137</pre>
862
+ </td>
863
+ <td>
864
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 134</span>
865
+
866
+ <span class='kw'>def</span> <span class='id satisfies_pkg_name?'>satisfies_pkg_name?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id expected'>expected</span>
867
+ <span class='comment'>#puts &quot;&gt;&gt; pkg_name: #{entity.pkg_name} vs. #{expected}&quot;
868
+ </span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id nil?'>nil?</span> <span class='op'>||</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:pkg_name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id pkg_name'>pkg_name</span><span class='period'>.</span><span class='id to_s'>to_s</span> <span class='op'>==</span> <span class='id expected'>expected</span><span class='period'>.</span><span class='id to_s'>to_s</span>
869
+ <span class='kw'>end</span></pre>
870
+ </td>
871
+ </tr>
872
+ </table>
873
+ </div>
874
+
875
+ <div class="method_details ">
876
+ <p class="signature " id="satisfies_platform?-instance_method">
877
+
878
+ - (<tt>Boolean</tt>) <strong>satisfies_platform?</strong>(entity) <span class="extras">(protected)</span>
879
+
880
+
881
+
882
+ </p><div class="docstring">
883
+ <div class="discussion">
884
+
885
+
886
+ </div>
887
+ </div>
888
+ <div class="tags">
889
+ <h3>Returns:</h3>
890
+ <ul class="return">
891
+
892
+ <li>
893
+
894
+ <span class='type'>(<tt>Boolean</tt>)</span>
895
+
896
+
897
+
898
+
899
+ </li>
900
+
901
+ </ul>
902
+
903
+ </div><table class="source_code">
904
+ <tr>
905
+ <td>
906
+ <pre class="lines">
907
+
908
+
909
+ 148
910
+ 149
911
+ 150
912
+ 151
913
+ 152
914
+ 153
915
+ 154</pre>
916
+ </td>
917
+ <td>
918
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 148</span>
919
+
920
+ <span class='kw'>def</span> <span class='id satisfies_platform?'>satisfies_platform?</span> <span class='id entity'>entity</span>
921
+ <span class='comment'>#puts&quot;&gt;&gt; satisfies platform?&quot;
922
+ </span> <span class='comment'># If not platform is defined, it's assumed to work on all platforms:
923
+ </span> <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:platform</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id platform'>platform</span><span class='period'>.</span><span class='id nil?'>nil?</span>
924
+ <span class='comment'>#puts &quot;&gt;&gt; platform: #{entity.platform}&quot;
925
+ </span> <span class='const'>Sprout</span><span class='period'>.</span><span class='id current_system'>current_system</span><span class='period'>.</span><span class='id can_execute?'>can_execute?</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id platform'>platform</span><span class='rparen'>)</span>
926
+ <span class='kw'>end</span></pre>
927
+ </td>
928
+ </tr>
929
+ </table>
930
+ </div>
931
+
932
+ <div class="method_details ">
933
+ <p class="signature " id="satisfies_version?-instance_method">
934
+
935
+ - (<tt>Boolean</tt>) <strong>satisfies_version?</strong>(entity, version_requirement = nil) <span class="extras">(protected)</span>
936
+
937
+
938
+
939
+ </p><div class="docstring">
940
+ <div class="discussion">
941
+
942
+
943
+ </div>
944
+ </div>
945
+ <div class="tags">
946
+ <h3>Returns:</h3>
947
+ <ul class="return">
948
+
949
+ <li>
950
+
951
+ <span class='type'>(<tt>Boolean</tt>)</span>
952
+
953
+
954
+
955
+
956
+ </li>
957
+
958
+ </ul>
959
+
960
+ </div><table class="source_code">
961
+ <tr>
962
+ <td>
963
+ <pre class="lines">
964
+
965
+
966
+ 156
967
+ 157
968
+ 158
969
+ 159
970
+ 160</pre>
971
+ </td>
972
+ <td>
973
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 156</span>
974
+
975
+ <span class='kw'>def</span> <span class='id satisfies_version?'>satisfies_version?</span> <span class='id entity'>entity</span><span class='comma'>,</span> <span class='id version_requirement'>version_requirement</span><span class='op'>=</span><span class='kw'>nil</span>
976
+ <span class='kw'>return</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id version_requirement'>version_requirement</span><span class='period'>.</span><span class='id nil?'>nil?</span>
977
+ <span class='id req_version'>req_version</span> <span class='op'>=</span> <span class='const'>Gem</span><span class='op'>::</span><span class='const'>Requirement</span><span class='period'>.</span><span class='id create'>create</span> <span class='id version_requirement'>version_requirement</span>
978
+ <span class='id req_version'>req_version</span><span class='period'>.</span><span class='id satisfied_by?'>satisfied_by?</span><span class='lparen'>(</span><span class='const'>Gem</span><span class='op'>::</span><span class='const'>Version</span><span class='period'>.</span><span class='id create'>create</span><span class='lparen'>(</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id pkg_version'>pkg_version</span><span class='rparen'>)</span><span class='rparen'>)</span>
979
+ <span class='kw'>end</span></pre>
980
+ </td>
981
+ </tr>
982
+ </table>
983
+ </div>
984
+
985
+ <div class="method_details ">
986
+ <p class="signature " id="update_registered_entities-instance_method">
987
+
988
+ - (<tt>Object</tt>) <strong>update_registered_entities</strong> <span class="extras">(protected)</span>
989
+
990
+
991
+
992
+ </p><div class="docstring">
993
+ <div class="discussion">
994
+
995
+ <p>Used by the Generator::Base to update inputs from empty class definitions
996
+ to instances..</p>
997
+
998
+
999
+ </div>
1000
+ </div>
1001
+ <div class="tags">
1002
+
1003
+ </div><table class="source_code">
1004
+ <tr>
1005
+ <td>
1006
+ <pre class="lines">
1007
+
1008
+
1009
+ 110
1010
+ 111</pre>
1011
+ </td>
1012
+ <td>
1013
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 110</span>
1014
+
1015
+ <span class='kw'>def</span> <span class='id update_registered_entities'>update_registered_entities</span>
1016
+ <span class='kw'>end</span></pre>
1017
+ </td>
1018
+ </tr>
1019
+ </table>
1020
+ </div>
1021
+
1022
+ <div class="method_details ">
1023
+ <p class="signature " id="validate_registration-instance_method">
1024
+
1025
+ - (<tt>Object</tt>) <strong>validate_registration</strong>(entity) <span class="extras">(protected)</span>
1026
+
1027
+
1028
+
1029
+ </p><table class="source_code">
1030
+ <tr>
1031
+ <td>
1032
+ <pre class="lines">
1033
+
1034
+
1035
+ 101
1036
+ 102
1037
+ 103
1038
+ 104
1039
+ 105</pre>
1040
+ </td>
1041
+ <td>
1042
+ <pre class="code"><span class="info file"># File 'lib/sprout/ruby_feature.rb', line 101</span>
1043
+
1044
+ <span class='kw'>def</span> <span class='id validate_registration'>validate_registration</span> <span class='id entity'>entity</span>
1045
+ <span class='kw'>if</span><span class='lparen'>(</span><span class='op'>!</span><span class='id entity'>entity</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id entity'>entity</span><span class='period'>.</span><span class='id name'>name</span><span class='period'>.</span><span class='id nil?'>nil?</span><span class='rparen'>)</span>
1046
+ <span class='id raise'>raise</span> <span class='const'>Sprout</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>UsageError</span><span class='period'>.</span><span class='id new'>new</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot register a RubyFeature without a 'name' getter</span><span class='tstring_end'>&quot;</span></span>
1047
+ <span class='kw'>end</span>
1048
+ <span class='kw'>end</span></pre>
1049
+ </td>
1050
+ </tr>
1051
+ </table>
1052
+ </div>
1053
+
1054
+ </div>
1055
+
1056
+ </div>
1057
+
1058
+ <div id="footer">
1059
+ Generated on Fri Apr 29 18:33:06 2011 by
1060
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1061
+ 0.6.3 (ruby-1.9.2).
1062
+ </div>
1063
+
1064
+ </body>
1065
+ </html>