Class: Fbtxt::ParserResult

Inherits:
Object show all
Defined in:
lib/fbtxt/parser/parser-top.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#errorsObject (readonly)

Returns the value of attribute errors.



6
7
8
# File 'lib/fbtxt/parser/parser-top.rb', line 6

def errors
  @errors
end

#treeObject (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

Returns:

  • (Boolean)


12
# File 'lib/fbtxt/parser/parser-top.rb', line 12

def nok?() !ok?; end

#ok?Boolean

Returns:

  • (Boolean)


11
# File 'lib/fbtxt/parser/parser-top.rb', line 11

def ok?()  @errors.size == 0; end