Class: RBI::TStructProp
- Inherits:
-
TStructField
show all
- Extended by:
- T::Sig
- Includes:
- Indexable
- Defined in:
- lib/rbi/index.rb,
lib/rbi/model.rb,
lib/rbi/rewriters/merge_trees.rb
Instance Attribute Summary
Attributes inherited from TStructField
#default, #name, #type
#comments
Attributes inherited from Node
#loc, #parent_tree
Instance Method Summary
collapse
#accept_printer, #initialize
#initialize, #merge_with, #oneline?
Methods inherited from Node
#accept_printer, #detach, #group_kind, #initialize, #merge_with, #oneline?, #parent_conflict_tree, #parent_scope, #print, #replace, #string
Instance Method Details
#compatible_with?(other) ⇒ Boolean
486
487
488
|
# File 'lib/rbi/rewriters/merge_trees.rb', line 486
def compatible_with?(other)
other.is_a?(TStructProp) && super
end
|
#fully_qualified_names ⇒ Object
768
769
770
771
|
# File 'lib/rbi/model.rb', line 768
def fully_qualified_names
parent_name = parent_scope&.fully_qualified_name
["#{parent_name}##{name}", "#{parent_name}##{name}="]
end
|
#index_ids ⇒ Object
172
173
174
|
# File 'lib/rbi/index.rb', line 172
def index_ids
fully_qualified_names
end
|
#to_s ⇒ Object
774
775
776
|
# File 'lib/rbi/model.rb', line 774
def to_s
"#{parent_scope&.fully_qualified_name}.prop(:#{name})"
end
|