Module: TwitterCldr::Utils::RegexpAst

Defined in:
lib/twitter_cldr/utils/regexp_ast.rb

Defined Under Namespace

Classes: Alternation, Alternative, Capture, CharacterSet, Digit, EscapeSequence, Literal, Node, Passive, Quantifier, Root, Sequence, Word

Class Method Summary collapse

Class Method Details

.dump(ast) ⇒ Object



16
17
18
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 16

def self.dump(ast)
  Base64.encode64(Marshal.dump(ast))
end

.load(ast_str) ⇒ Object



12
13
14
# File 'lib/twitter_cldr/utils/regexp_ast.rb', line 12

def self.load(ast_str)
  Marshal.load(Base64.decode64(ast_str))
end