Class: SyntaxTree::RBS::MethodSignature::RequiredKeyword
- Inherits:
-
Object
- Object
- SyntaxTree::RBS::MethodSignature::RequiredKeyword
- Defined in:
- lib/syntax_tree/rbs/utils.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
Instance Method Summary collapse
- #format(q) ⇒ Object
-
#initialize(name, param) ⇒ RequiredKeyword
constructor
A new instance of RequiredKeyword.
Constructor Details
#initialize(name, param) ⇒ RequiredKeyword
Returns a new instance of RequiredKeyword.
258 259 260 261 |
# File 'lib/syntax_tree/rbs/utils.rb', line 258 def initialize(name, param) @name = name @param = param end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
256 257 258 |
# File 'lib/syntax_tree/rbs/utils.rb', line 256 def name @name end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
256 257 258 |
# File 'lib/syntax_tree/rbs/utils.rb', line 256 def param @param end |
Instance Method Details
#format(q) ⇒ Object
263 264 265 266 267 |
# File 'lib/syntax_tree/rbs/utils.rb', line 263 def format(q) q.text(name) q.text(": ") param.format(q) end |