Class: Rigor::RbsExtended::EffectAnnotation

Inherits:
Data
  • Object
show all
Defined in:
lib/rigor/rbs_extended.rb

Overview

The outcome of reading one %a{rigor:v1:effect …} payload.

bound is the declared Effects::LabelSet, or Effects::LabelSet::TOP when the tag could not be given a meaning. malformed says the grammar was violated (an empty list, a token that is not a label); unknown_labels says the grammar held but the registry does not recognise a spelling — a different condition with different handling, and what #384's effect.unknown-label reads. labels is the list exactly as written, recognised or not, which is what lets the diagnostic ask whether some OTHER member of the list was known.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#boundObject (readonly)

Returns the value of attribute bound

Returns:

  • (Object)

    the current value of bound



656
657
658
# File 'lib/rigor/rbs_extended.rb', line 656

def bound
  @bound
end

#labelsObject (readonly)

Returns the value of attribute labels

Returns:

  • (Object)

    the current value of labels



656
657
658
# File 'lib/rigor/rbs_extended.rb', line 656

def labels
  @labels
end

#malformedObject (readonly)

Returns the value of attribute malformed

Returns:

  • (Object)

    the current value of malformed



656
657
658
# File 'lib/rigor/rbs_extended.rb', line 656

def malformed
  @malformed
end

#unknown_labelsObject (readonly)

Returns the value of attribute unknown_labels

Returns:

  • (Object)

    the current value of unknown_labels



656
657
658
# File 'lib/rigor/rbs_extended.rb', line 656

def unknown_labels
  @unknown_labels
end

Instance Method Details

#malformed?Boolean

Returns:

  • (Boolean)


657
# File 'lib/rigor/rbs_extended.rb', line 657

def malformed? = malformed

#top?Boolean

Returns:

  • (Boolean)


658
# File 'lib/rigor/rbs_extended.rb', line 658

def top? = bound.top?