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.



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

def initialize(string)
  @string = string
end

Instance Attribute Details

#stringObject

Returns the value of attribute string.



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

def string
  @string
end

Instance Method Details

#extract_hashObject



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

def extract_hash
  @string = Substitutions.process @string
end

#textObject



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

def text
  @string
end