Class: Twiddler::TargetBuilder::Builder
- Inherits:
-
Object
- Object
- Twiddler::TargetBuilder::Builder
- Defined in:
- lib/twiddler/target_builder.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #go ⇒ Object
-
#initialize(dir, dict, config) ⇒ Builder
constructor
A new instance of Builder.
- #output_to(name) ⇒ Object
Constructor Details
#initialize(dir, dict, config) ⇒ Builder
Returns a new instance of Builder.
27 28 29 30 31 |
# File 'lib/twiddler/target_builder.rb', line 27 def initialize(dir, dict, config) @dir = dir @dict = dict @config = config end |
Class Method Details
.register ⇒ Object
17 18 19 20 |
# File 'lib/twiddler/target_builder.rb', line 17 def register @@registered ||= [] @@registered << self end |
.registered ⇒ Object
22 23 24 |
# File 'lib/twiddler/target_builder.rb', line 22 def registered @@registered || [] end |
Instance Method Details
#go ⇒ Object
39 40 |
# File 'lib/twiddler/target_builder.rb', line 39 def go end |
#output_to(name) ⇒ Object
33 34 35 36 37 |
# File 'lib/twiddler/target_builder.rb', line 33 def output_to(name) File::open(File::("#{name}.list", @dir), "w") do |file| yield(file) end end |