Module: Hamlit::Parsers::Filter
Instance Method Summary collapse
Methods included from Concerns::Indentable
#count_indent, #count_width, #next_indent, #next_width, #reset_indent, #same_indent?, #with_indented
Methods included from Concerns::Error
#assert_scan!, #copmile_error!, #syntax_error
Instance Method Details
#parse_filter(scanner) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/hamlit/parsers/filter.rb', line 9 def parse_filter(scanner) assert_scan!(scanner, /:/) name = scanner.scan(/.+/).strip lines = with_indented { read_lines } [:haml, :filter, name, lines] end |