Class: Rigor::RbsExtended::PredicateEffect
- Inherits:
-
Data
- Object
- Data
- Rigor::RbsExtended::PredicateEffect
- Defined in:
- lib/rigor/rbs_extended.rb
Overview
Returned for ‘predicate-if-true` / `predicate-if-false`. `target_kind` is `:parameter` (with `target_name` the Ruby parameter symbol) or `:self`. `negative` is true when the directive uses the `~ClassName` form, in which case the engine narrows AWAY from `class_name` (`Narrowing.narrow_not_class`) instead of toward it.
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#edge ⇒ Object
readonly
Returns the value of attribute edge.
-
#negative ⇒ Object
readonly
Returns the value of attribute negative.
-
#target_kind ⇒ Object
readonly
Returns the value of attribute target_kind.
-
#target_name ⇒ Object
readonly
Returns the value of attribute target_name.
Instance Method Summary collapse
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name
53 54 55 |
# File 'lib/rigor/rbs_extended.rb', line 53 def class_name @class_name end |
#edge ⇒ Object (readonly)
Returns the value of attribute edge
53 54 55 |
# File 'lib/rigor/rbs_extended.rb', line 53 def edge @edge end |
#negative ⇒ Object (readonly)
Returns the value of attribute negative
53 54 55 |
# File 'lib/rigor/rbs_extended.rb', line 53 def negative @negative end |
#target_kind ⇒ Object (readonly)
Returns the value of attribute target_kind
53 54 55 |
# File 'lib/rigor/rbs_extended.rb', line 53 def target_kind @target_kind end |
#target_name ⇒ Object (readonly)
Returns the value of attribute target_name
53 54 55 |
# File 'lib/rigor/rbs_extended.rb', line 53 def target_name @target_name end |
Instance Method Details
#falsey_only? ⇒ Boolean
55 |
# File 'lib/rigor/rbs_extended.rb', line 55 def falsey_only? = edge == :falsey_only |
#negative? ⇒ Boolean
56 |
# File 'lib/rigor/rbs_extended.rb', line 56 def negative? = negative == true |
#truthy_only? ⇒ Boolean
54 |
# File 'lib/rigor/rbs_extended.rb', line 54 def truthy_only? = edge == :truthy_only |