Class: Vebdew::Parser
- Inherits:
-
Object
- Object
- Vebdew::Parser
- Defined in:
- lib/vebdew/parser.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#footer ⇒ Object
readonly
Returns the value of attribute footer.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
Instance Method Summary collapse
-
#initialize(lines) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(lines) ⇒ Parser
Returns a new instance of Parser.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/vebdew/parser.rb', line 7 def initialize lines @lines = lines @header = [] @body = [] @footer = [] @buffer = [] @attrs = Hash.new { |h, k| h[k] = [] } @flag = Hash.new { |h, k| h[k] = false } parse end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/vebdew/parser.rb', line 5 def body @body end |
#footer ⇒ Object (readonly)
Returns the value of attribute footer.
5 6 7 |
# File 'lib/vebdew/parser.rb', line 5 def @footer end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
5 6 7 |
# File 'lib/vebdew/parser.rb', line 5 def header @header end |