Class: RBI::Public
- Inherits:
-
Visibility
- Object
- Node
- NodeWithComments
- Visibility
- RBI::Public
- Defined in:
- lib/rbi/model.rb
Constant Summary collapse
- DEFAULT =
Shared default instance to avoid allocating a new Public on every Method/Attr creation.
new.freeze
Instance Attribute Summary
Attributes inherited from Visibility
Attributes inherited from NodeWithComments
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(loc: nil, comments: nil, &block) ⇒ Public
constructor
A new instance of Public.
Methods inherited from Visibility
#==, #private?, #protected?, #public?
Methods inherited from NodeWithComments
#annotations, #comments?, #merge_with, #version_requirements
Methods inherited from Node
#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #rbs_print, #rbs_string, #replace, #satisfies_version?, #string
Constructor Details
#initialize(loc: nil, comments: nil, &block) ⇒ Public
Returns a new instance of Public.
920 921 922 923 |
# File 'lib/rbi/model.rb', line 920 def initialize(loc: nil, comments: nil, &block) super(:public, loc: loc, comments: comments) block&.call(self) end |