Class: Vebdew::Parser

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lines) ⇒ Parser

Returns a new instance of Parser.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/vebdew/parser.rb', line 5

def initialize lines
  @lines = lines
  @header = []
  @body = []
  @footer = []
  @buffer = []
  @attrs = ""
  @flag = Hash.new { |h, k| h[k] = false }

  parse
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/vebdew/parser.rb', line 3

def body
  @body
end

Returns the value of attribute footer.



3
4
5
# File 'lib/vebdew/parser.rb', line 3

def footer
  @footer
end

#headerObject (readonly)

Returns the value of attribute header.



3
4
5
# File 'lib/vebdew/parser.rb', line 3

def header
  @header
end