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,10 +11,9 @@ module Hbc
@token = token @token = token
@sourcefile_path = sourcefile_path @sourcefile_path = sourcefile_path
@dsl = dsl || DSL.new(@token) @dsl = dsl || DSL.new(@token)
if block_given? return unless block_given?
@dsl.instance_eval(&block) @dsl.instance_eval(&block)
@dsl.language_eval @dsl.language_eval
end
end end
DSL::DSL_METHODS.each do |method_name| DSL::DSL_METHODS.each do |method_name|