Class: MODL::Parser::Parsed::ParsedString

Inherits:
Object
  • Object
show all
Defined in:
lib/modl/parser/parsed.rb

Overview

Class to represent a parsed grammar object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ ParsedString

Returns a new instance of ParsedString.



738
739
740
# File 'lib/modl/parser/parsed.rb', line 738

def initialize(string)
  @string = string
end

Instance Attribute Details

#stringObject

Returns the value of attribute string.



736
737
738
# File 'lib/modl/parser/parsed.rb', line 736

def string
  @string
end

Instance Method Details

#extract_hashObject



746
747
748
# File 'lib/modl/parser/parsed.rb', line 746

def extract_hash
  @string = Substitutions.process UnicodeEscapes.process @string
end

#textObject



742
743
744
# File 'lib/modl/parser/parsed.rb', line 742

def text
  @string
end