Class: Fbtxt::ParserResult
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#tree ⇒ Object
readonly
Returns the value of attribute tree.
Instance Method Summary collapse
-
#initialize(tree, errors = []) ⇒ ParserResult
constructor
A new instance of ParserResult.
- #nok? ⇒ Boolean
- #ok? ⇒ Boolean
Constructor Details
#initialize(tree, errors = []) ⇒ ParserResult
Returns a new instance of ParserResult.
7 8 9 |
# File 'lib/fbtxt/parser/parser-top.rb', line 7 def initialize( tree, errors=[] ) @tree, @errors = tree, errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'lib/fbtxt/parser/parser-top.rb', line 6 def errors @errors end |
#tree ⇒ Object (readonly)
Returns the value of attribute tree.
6 7 8 |
# File 'lib/fbtxt/parser/parser-top.rb', line 6 def tree @tree end |
Instance Method Details
#nok? ⇒ Boolean
12 |
# File 'lib/fbtxt/parser/parser-top.rb', line 12 def nok?() !ok?; end |
#ok? ⇒ Boolean
11 |
# File 'lib/fbtxt/parser/parser-top.rb', line 11 def ok?() @errors.size == 0; end |