File: parser_helper.rb

package info (click to toggle)
ruby-prawn-icon 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,228 kB
  • sloc: ruby: 1,370; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 408 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# encoding: utf-8
#
# Copyright October 2014, Jesse Doyle. All rights reserved.
#
# This is free software. Please see the LICENSE and COPYING files for details.

module ParserHelper
  def tokenize_string(string)
    regex = Prawn::Icon::Parser::PARSER_REGEX
    string.scan(regex)
  end

  def contentize_string(string)
    regex = Prawn::Icon::Parser::CONTENT_REGEX
    string.scan(regex).flatten
  end
end