Class: Thor::Tasks::Merb::Collector
- Inherits:
-
Object
- Object
- Thor::Tasks::Merb::Collector
- Defined in:
- lib/generators/templates/application/common/merb_thor/ops.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
Class Method Summary collapse
Instance Method Summary collapse
- #dependency(name, *versions) ⇒ Object
-
#initialize ⇒ Collector
constructor
A new instance of Collector.
Constructor Details
#initialize ⇒ Collector
Returns a new instance of Collector.
12 13 14 |
# File 'lib/generators/templates/application/common/merb_thor/ops.rb', line 12 def initialize @dependencies = [] end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
4 5 6 |
# File 'lib/generators/templates/application/common/merb_thor/ops.rb', line 4 def dependencies @dependencies end |
Class Method Details
.collect(str) ⇒ Object
6 7 8 9 10 |
# File 'lib/generators/templates/application/common/merb_thor/ops.rb', line 6 def self.collect(str) collector = new collector.instance_eval(str) collector.dependencies end |
Instance Method Details
#dependency(name, *versions) ⇒ Object
16 17 18 |
# File 'lib/generators/templates/application/common/merb_thor/ops.rb', line 16 def dependency(name, *versions) @dependencies << [name, versions] end |