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.



731
732
733
# File 'lib/modl/parser/parsed.rb', line 731

def initialize(string)
  @string = string
end

Instance Attribute Details

#stringObject

Returns the value of attribute string.



729
730
731
# File 'lib/modl/parser/parsed.rb', line 729

def string
  @string
end

Instance Method Details

#extract_hashObject



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

def extract_hash
  @string = Substitutions.process @string
end

#textObject



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

def text
  @string
end