Class: Spoom::Sorbet::Assertions::AssignNode
- Inherits:
-
Object
- Object
- Spoom::Sorbet::Assertions::AssignNode
- Defined in:
- lib/spoom/sorbet/assertions.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
: AssignType.
-
#operator_loc ⇒ Object
readonly
: Prism::Location.
-
#type ⇒ Object
readonly
: Prism::Node.
-
#value ⇒ Object
readonly
: Prism::Node.
Instance Method Summary collapse
-
#initialize(node, operator_loc, value, type) ⇒ AssignNode
constructor
: (AssignType, Prism::Location, Prism::Node, Prism::Node) -> void.
-
#rbs_type ⇒ Object
: -> String.
Constructor Details
#initialize(node, operator_loc, value, type) ⇒ AssignNode
: (AssignType, Prism::Location, Prism::Node, Prism::Node) -> void
133 134 135 136 137 138 |
# File 'lib/spoom/sorbet/assertions.rb', line 133 def initialize(node, operator_loc, value, type) @node = node @operator_loc = operator_loc @value = value @type = type end |
Instance Attribute Details
#node ⇒ Object (readonly)
: AssignType
124 125 126 |
# File 'lib/spoom/sorbet/assertions.rb', line 124 def node @node end |
#operator_loc ⇒ Object (readonly)
: Prism::Location
127 128 129 |
# File 'lib/spoom/sorbet/assertions.rb', line 127 def operator_loc @operator_loc end |
#type ⇒ Object (readonly)
: Prism::Node
130 131 132 |
# File 'lib/spoom/sorbet/assertions.rb', line 130 def type @type end |
#value ⇒ Object (readonly)
: Prism::Node
130 131 132 |
# File 'lib/spoom/sorbet/assertions.rb', line 130 def value @value end |
Instance Method Details
#rbs_type ⇒ Object
: -> String
141 142 143 |
# File 'lib/spoom/sorbet/assertions.rb', line 141 def rbs_type RBI::Type.parse_node(type).rbs_string end |