Module: Brutal

Defined in:
lib/brutal.rb,
lib/brutal/yaml.rb,
lib/brutal/scaffold.rb,
lib/brutal/file/read.rb,
lib/brutal/file/write.rb,
lib/brutal/configuration.rb

Overview

The Brutal namespace.

Defined Under Namespace

Modules: File, Yaml Classes: Configuration, Scaffold

Class Method Summary collapse

Class Method Details

.generate!Object


13
14
15
16
17
18
19
20
21
22
23
# File 'lib/brutal.rb', line 13

def self.generate!
  yaml = File::Read.new.call
  hash = Yaml.parse(yaml)
  conf = Configuration.load(hash)
  ruby = Scaffold.new(conf.header,
                      conf.subject,
                      *conf.actuals,
                      **conf.contexts)

  File::Write.new.call(ruby)
end