Module: Swift::Boiler

Defined in:
lib/swift/boiler.rb,
lib/swift/boiler/token.rb,
lib/swift/boiler/parser.rb,
lib/swift/boiler/builder.rb,
lib/swift/boiler/scanner.rb,
lib/swift/boiler/version.rb,
lib/swift/boiler/template.rb,
lib/swift/boiler/token_factory.rb,
lib/swift/boiler/token_pattern_validator.rb

Defined Under Namespace

Classes: Builder, Parser, Scanner, Template, Token, TokenFactory, TokenPatternValidator

Constant Summary collapse

VERSION =
"1.0.10"

Class Method Summary collapse

Class Method Details

.boil(arguments) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/swift/boiler.rb', line 11

def boil(arguments)
  if is_help_request(arguments) 
    print_help_text()
  else 
    begin
      template = build_template_from_arguments(arguments)
      create_file_from_template(template)    
    rescue ArgumentError => argumentError
      print "swift-boiler: #{argumentError.message}. Please see 'swift-boil --help'."
    end
  end
end