Class: EimXML::Parser
- Inherits:
-
Object
- Object
- EimXML::Parser
- Defined in:
- lib/eim_xml/parser.rb
Defined Under Namespace
Modules: RE
Constant Summary collapse
- PARSING_MAP =
{ 'amp' => '&', 'quot' => '"', 'apos' => "'", 'lt' => '<', 'gt' => '>' }
Instance Attribute Summary collapse
-
#scanner ⇒ Object
readonly
Returns the value of attribute scanner.
Instance Method Summary collapse
-
#initialize(src) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(src) ⇒ Parser
Returns a new instance of Parser.
33 34 35 36 |
# File 'lib/eim_xml/parser.rb', line 33 def initialize(src) @scanner = StringScanner.new(src) @scanner.scan(/\s*<\?.*?\?>\s*/) end |
Instance Attribute Details
#scanner ⇒ Object (readonly)
Returns the value of attribute scanner.
15 16 17 |
# File 'lib/eim_xml/parser.rb', line 15 def scanner @scanner end |