Module: Hamlit::Parsers::Filter
Instance Method Summary collapse
Methods included from Concerns::Indentable
#count_indent, #count_width, #indent_label, #next_indent, #next_width, #replace_hard_tabs, #reset_indent, #same_indent?, #validate_indentation!, #with_indented
Methods included from Concerns::Error
#assert_scan!, #copmile_error!, #syntax_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 |