Class: Rigor::Type::Dynamic
- Inherits:
-
Object
- Object
- Rigor::Type::Dynamic
- Includes:
- AcceptanceRouter, ValueSemantics
- Defined in:
- lib/rigor/type/dynamic.rb
Overview
The dynamic-origin wrapper: marks values whose type came from an unchecked source. Carries a static facet that records the analyzer’s best static knowledge. See docs/type-specification/value-lattice.md for the algebra and docs/type-specification/special-types.md for the untyped/Dynamic relationship.
Construct via Rigor::Type::Combinator.dynamic(static_facet).
Instance Attribute Summary collapse
-
#static_facet ⇒ Object
readonly
Returns the value of attribute static_facet.
Instance Method Summary collapse
- #bot ⇒ Object
- #describe(verbosity = :short) ⇒ Object
- #dynamic ⇒ Object
- #erase_to_rbs ⇒ Object
-
#initialize(static_facet) ⇒ Dynamic
constructor
A new instance of Dynamic.
- #inspect ⇒ Object
- #top ⇒ Object
Methods included from ValueSemantics
Methods included from AcceptanceRouter
Constructor Details
#initialize(static_facet) ⇒ Dynamic
Returns a new instance of Dynamic.
19 20 21 22 |
# File 'lib/rigor/type/dynamic.rb', line 19 def initialize(static_facet) @static_facet = static_facet freeze end |
Instance Attribute Details
#static_facet ⇒ Object (readonly)
Returns the value of attribute static_facet.
17 18 19 |
# File 'lib/rigor/type/dynamic.rb', line 17 def static_facet @static_facet end |
Instance Method Details
#describe(verbosity = :short) ⇒ Object
24 25 26 |
# File 'lib/rigor/type/dynamic.rb', line 24 def describe(verbosity = :short) "Dynamic[#{static_facet.describe(verbosity)}]" end |
#erase_to_rbs ⇒ Object
28 29 30 |
# File 'lib/rigor/type/dynamic.rb', line 28 def erase_to_rbs "untyped" end |
#inspect ⇒ Object
50 51 52 |
# File 'lib/rigor/type/dynamic.rb', line 50 def inspect "#<Rigor::Type::Dynamic #{describe(:short)}>" end |