Class: Rucoa::ParseResult

Inherits:
Object
  • Object
show all
Defined in:
lib/rucoa/parse_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(associations: nil, failed: false, root_node: nil) ⇒ ParseResult

Returns a new instance of ParseResult.

Parameters:

  • associations (Array<Parser::Source::Comment>, nil) (defaults to: nil)
  • failed (Boolean) (defaults to: false)
  • root_node (Rucoa::Nodes::Base, nil) (defaults to: nil)


14
15
16
17
18
19
20
21
22
# File 'lib/rucoa/parse_result.rb', line 14

def initialize(
  associations: nil,
  failed: false,
  root_node: nil
)
  @associations = associations
  @failed = failed
  @root_node = root_node
end

Instance Attribute Details

#associationsArray<Parser::Source::Comment>? (readonly)

Returns:

  • (Array<Parser::Source::Comment>, nil)


6
7
8
# File 'lib/rucoa/parse_result.rb', line 6

def associations
  @associations
end

#root_nodeRucoa::Nodes::Base? (readonly)

Returns:



9
10
11
# File 'lib/rucoa/parse_result.rb', line 9

def root_node
  @root_node
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/rucoa/parse_result.rb', line 25

def failed?
  @failed
end