Class: DemoConfig
- Inherits:
-
Object
- Object
- DemoConfig
- Defined in:
- lib/tidy/demo_config.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ DemoConfig
constructor
A new instance of DemoConfig.
Constructor Details
#initialize(options) ⇒ DemoConfig
Returns a new instance of DemoConfig.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/tidy/demo_config.rb', line 16 def initialize() template = File.read( "#{File.(File.dirname(__FILE__))}/templates/demo_config.as.erb" ) @vars = [:vars] @class = [:class] @package = "" as_class = ERB.new(template) `mkdir -p #{File.dirname([:output])}` File.open([:output],'w') do |f| f << as_class.result(binding) end end |