diff --git a/lib/hamlit/hash_parser.rb b/lib/hamlit/attribute_parser.rb similarity index 99% rename from lib/hamlit/hash_parser.rb rename to lib/hamlit/attribute_parser.rb index ca6b83fd..fa7ed8be 100644 --- a/lib/hamlit/hash_parser.rb +++ b/lib/hamlit/attribute_parser.rb @@ -1,7 +1,7 @@ require 'hamlit/ruby_expression' module Hamlit - class HashParser + class AttributeParser class ParseSkip < StandardError end diff --git a/lib/hamlit/compiler/attribute_compiler.rb b/lib/hamlit/compiler/attribute_compiler.rb index afee2b05..318561e4 100644 --- a/lib/hamlit/compiler/attribute_compiler.rb +++ b/lib/hamlit/compiler/attribute_compiler.rb @@ -1,5 +1,5 @@ require 'hamlit/attribute_builder' -require 'hamlit/hash_parser' +require 'hamlit/attribute_parser' require 'hamlit/ruby_expression' require 'hamlit/static_analyzer' require 'hamlit/string_interpolation' @@ -18,7 +18,7 @@ module Hamlit hashes = [] return runtime_compile(node) if node.value[:object_ref] != :nil node.value[:attributes_hashes].each do |attribute_str| - hash = HashParser.parse(attribute_str) + hash = AttributeParser.parse(attribute_str) return runtime_compile(node) unless hash hashes << hash end diff --git a/test/hamlit/hash_parser_test.rb b/test/hamlit/attribute_parser_test.rb similarity index 98% rename from test/hamlit/hash_parser_test.rb rename to test/hamlit/attribute_parser_test.rb index 75d25e7a..543edae8 100644 --- a/test/hamlit/hash_parser_test.rb +++ b/test/hamlit/attribute_parser_test.rb @@ -1,7 +1,7 @@ -describe Hamlit::HashParser do +describe Hamlit::AttributeParser do describe '.parse' do def assert_parse(expected, haml) - actual = Hamlit::HashParser.parse(haml) + actual = Hamlit::AttributeParser.parse(haml) assert_equal expected, actual end