class RBI::TStructProp
Public Class Methods
new(name, type, default: nil, loc: nil, comments: [], &block)
click to toggle source
Calls superclass method
RBI::TStructField::new
# File lib/rbi/model.rb, line 1095 def initialize(name, type, default: nil, loc: nil, comments: [], &block) super(name, type, default: default, loc: loc, comments: comments) block&.call(self) end
Public Instance Methods
compatible_with?(other)
click to toggle source
Calls superclass method
RBI::TStructField#compatible_with?
# File lib/rbi/rewriters/merge_trees.rb, line 528 def compatible_with?(other) other.is_a?(TStructProp) && super end
fully_qualified_names()
click to toggle source
# File lib/rbi/model.rb, line 1101 def fully_qualified_names parent_name = parent_scope&.fully_qualified_name ["#{parent_name}##{name}", "#{parent_name}##{name}="] end
index_ids()
click to toggle source
# File lib/rbi/index.rb, line 172 def index_ids fully_qualified_names end
to_s()
click to toggle source
# File lib/rbi/model.rb, line 1107 def to_s "#{parent_scope&.fully_qualified_name}.prop(:#{name})" end