lib/authoreyes/parser/dsl_parser.rb in authoreyes-0.2.1 vs lib/authoreyes/parser/dsl_parser.rb in authoreyes-0.2.2

- old
+ new

@@ -11,11 +11,11 @@ def initialize @privileges_reader = PrivilegesReader.new @auth_rules_reader = AuthorizationRulesParser.new end - def initialize_copy (from) # :nodoc: + def initialize_copy(from) # :nodoc: @privileges_reader = from.privileges_reader.clone @auth_rules_reader = from.auth_rules_reader.clone end # ensures you get back a DSLReader @@ -38,12 +38,12 @@ if file_name DSLMethods.new(self).instance_eval(dsl_data, file_name) else DSLMethods.new(self).instance_eval(dsl_data) end - rescue SyntaxError, NoMethodError, NameError => e - raise DSLSyntaxError, "Illegal DSL syntax: #{e}" + rescue SyntaxError, NoMethodError, NameError => e + raise DSLSyntaxError, "Illegal DSL syntax: #{e}" end # Load and parse a DSL from the given file name. def load(dsl_file) parse(File.read(dsl_file), dsl_file) if File.exist?(dsl_file) @@ -57,10 +57,10 @@ load(dsl_file) end # Loads and parses DSL files and returns a new reader def self.load(dsl_files) - # TODO cache reader in production mode? + # TODO: cache reader in production mode? reader = new dsl_files = [dsl_files].flatten dsl_files.each do |file| reader.load(file) end