Class: Ibex::GrammarTests::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/ibex/grammar_tests.rb,
lib/ibex/grammar_tests.rb,
sig/ibex/grammar_tests.rbs,
sig/ibex/grammar_tests.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actualObject

Returns the value of attribute actual

Returns:

  • (Object)

    the current value of actual



15
16
17
# File 'lib/ibex/grammar_tests.rb', line 15

def actual
  @actual
end

#error_classObject

Returns the value of attribute error_class

Returns:

  • (Object)

    the current value of error_class



15
16
17
# File 'lib/ibex/grammar_tests.rb', line 15

def error_class
  @error_class
end

#error_messageObject

Returns the value of attribute error_message

Returns:

  • (Object)

    the current value of error_message



15
16
17
# File 'lib/ibex/grammar_tests.rb', line 15

def error_message
  @error_message
end

#expectationObject

Returns the value of attribute expectation

Returns:

  • (Object)

    the current value of expectation



15
16
17
# File 'lib/ibex/grammar_tests.rb', line 15

def expectation
  @expectation
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



15
16
17
# File 'lib/ibex/grammar_tests.rb', line 15

def location
  @location
end

#production_idsObject

Returns the value of attribute production_ids

Returns:

  • (Object)

    the current value of production_ids



15
16
17
# File 'lib/ibex/grammar_tests.rb', line 15

def production_ids
  @production_ids
end

Class Method Details

.new(expectation:, actual:, error_class:, error_message:, location:, production_ids:) ⇒ instance .new(arg0) ⇒ instance

Overloads:

  • .new(expectation:, actual:, error_class:, error_message:, location:, production_ids:) ⇒ instance

    Parameters:

    • expectation: (Symbol)
    • actual: (Symbol)
    • error_class: (String, nil)
    • error_message: (String, nil)
    • location: (IR::location)
    • production_ids: (Array[Integer])

    Returns:

    • (instance)
  • .new(arg0) ⇒ instance

    Parameters:

    • arg0 ({ ?expectation: Symbol, ?actual: Symbol, ?error_class: String?, ?error_message: String?, ?location: IR::location, ?production_ids: Array[Integer] })

    Returns:

    • (instance)


23
24
# File 'sig/ibex/grammar_tests.rbs', line 23

def self.new: (?expectation: Symbol, ?actual: Symbol, ?error_class: String?, ?error_message: String?, ?location: IR::location, ?production_ids: Array[Integer]) -> instance
| ({ ?expectation: Symbol, ?actual: Symbol, ?error_class: String?, ?error_message: String?, ?location: IR::location, ?production_ids: Array[Integer] }) -> instance

Instance Method Details

#passed?Boolean

RBS:

  • () -> bool

Returns:

  • (Boolean)


27
# File 'lib/ibex/grammar_tests.rb', line 27

def passed? = expectation == actual