Class: RBS::Definition::Variable
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/definition.rb |
Class Method Summary
Instance Attribute Summary
- #declared_in readonly
- #parent_variable readonly
- #type readonly
Instance Method Summary
Constructor Details
.new(parent_variable:, type:, declared_in:) ⇒ Variable
# File 'lib/rbs/definition.rb', line 10
def initialize(parent_variable:, type:, declared_in:) @parent_variable = parent_variable @type = type @declared_in = declared_in end
Instance Attribute Details
#declared_in (readonly)
[ GitHub ]# File 'lib/rbs/definition.rb', line 8
attr_reader :declared_in
#parent_variable (readonly)
[ GitHub ]# File 'lib/rbs/definition.rb', line 6
attr_reader :parent_variable
#type (readonly)
[ GitHub ]# File 'lib/rbs/definition.rb', line 7
attr_reader :type
Instance Method Details
#sub(s)
[ GitHub ]# File 'lib/rbs/definition.rb', line 16
def sub(s) self.class.new( parent_variable: parent_variable, type: type.sub(s), declared_in: declared_in ) end