Class: RBI::Param
- Inherits:
-
NodeWithComments
- Object
- Node
- NodeWithComments
- RBI::Param
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/rbi/model.rb
Direct Known Subclasses
BlockParam, KwOptParam, KwParam, KwRestParam, OptParam, ReqParam, RestParam
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from NodeWithComments
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(name, loc: nil, comments: []) ⇒ Param
constructor
A new instance of Param.
- #to_s ⇒ Object
Methods inherited from NodeWithComments
#annotations, #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(name, loc: nil, comments: []) ⇒ Param
Returns a new instance of Param.
643 644 645 646 |
# File 'lib/rbi/model.rb', line 643 def initialize(name, loc: nil, comments: []) super(loc: loc, comments: comments) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
634 635 636 |
# File 'lib/rbi/model.rb', line 634 def name @name end |
Instance Method Details
#to_s ⇒ Object
649 650 651 |
# File 'lib/rbi/model.rb', line 649 def to_s name end |