Class: Twiddler::TargetBuilder::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/twiddler/target_builder.rb

Direct Known Subclasses

RegexpBuilder

Class Method Summary collapse

Instance Method Summary collapse

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

.registerObject



17
18
19
20
# File 'lib/twiddler/target_builder.rb', line 17

def register
  @@registered ||= []
  @@registered << self
end

.registeredObject



22
23
24
# File 'lib/twiddler/target_builder.rb', line 22

def registered
  @@registered || []
end

Instance Method Details

#goObject



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::expand_path("#{name}.list", @dir), "w") do |file|
    yield(file)
  end
end