Class: Nodaire::Indental::Parser

Inherits:
Parser
  • Object
show all
Defined in:
lib/nodaire/indental/parser.rb

Defined Under Namespace

Classes: Category

Instance Attribute Summary collapse

Attributes inherited from Parser

#errors, #options

Instance Method Summary collapse

Methods inherited from Parser

#oops!, #option, #strict?

Constructor Details

#initialize(source, strict, options = {}) ⇒ Parser

Returns a new instance of Parser.



12
13
14
15
16
17
18
19
20
# File 'lib/nodaire/indental/parser.rb', line 12

def initialize(source, strict, options = {})
  super(strict, options)

  @symbolize_names = option(:symbolize_names, false)
  @data = {}
  @category = nil

  parse! Nodaire::Indental::Lexer.tokenize(source)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



10
11
12
# File 'lib/nodaire/indental/parser.rb', line 10

def data
  @data
end