Use guard clauses.

This commit is contained in:
Markus Reiter 2016-10-23 14:26:17 +02:00
parent 9f513cc60c
commit ceec5a82c1

View File

@ -11,11 +11,10 @@ module Hbc
@token = token
@sourcefile_path = sourcefile_path
@dsl = dsl || DSL.new(@token)
if block_given?
return unless block_given?
@dsl.instance_eval(&block)
@dsl.language_eval
end
end
DSL::DSL_METHODS.each do |method_name|
define_method(method_name) { @dsl.send(method_name) }