Class: RBI::Protected

Inherits:
Visibility show all
Extended by:
T::Sig
Defined in:
lib/rbi/model.rb

Instance Attribute Summary

Attributes inherited from Visibility

#visibility

Attributes inherited from NodeWithComments

#comments

Attributes inherited from Node

#loc, #parent_tree

Instance Method Summary collapse

Methods inherited from Visibility

#==, #private?, #protected?, #public?

Methods inherited from NodeWithComments

#annotations, #merge_with, #version_requirements

Methods inherited from Node

#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #replace, #satisfies_version?, #string

Constructor Details

#initialize(loc: nil, comments: [], &block) ⇒ Protected

Returns a new instance of Protected.



978
979
980
981
# File 'lib/rbi/model.rb', line 978

def initialize(loc: nil, comments: [], &block)
  super(:protected, loc: loc, comments: comments)
  block&.call(self)
end