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