Class: Inch::Language::Elixir::Provider::Reader::Object::FunctionParameterObject
- Inherits:
-
Object
- Object
- Inch::Language::Elixir::Provider::Reader::Object::FunctionParameterObject
- Defined in:
- lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb
Overview
Proxy class for function parameters
Instance Attribute Summary collapse
- #name ⇒ String readonly
Instance Method Summary collapse
-
#block? ⇒ Boolean
true
if the parameter is a block. -
#described? ⇒ Boolean
true
if an additional description is given?. -
#initialize(method, name) ⇒ FunctionParameterObject
constructor
A new instance of FunctionParameterObject.
-
#mentioned? ⇒ Boolean
true
if the parameter is mentioned in the docs. -
#splat? ⇒ Boolean
true
if the parameter is a splat argument. -
#typed? ⇒ Boolean
true
if the type of the parameter is defined. -
#wrongly_mentioned? ⇒ Boolean
true
if the parameter is mentioned in the docs, but not present in the method’s signature.
Constructor Details
#initialize(method, name) ⇒ FunctionParameterObject
Returns a new instance of FunctionParameterObject.
14 15 16 17 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 14 def initialize(method, name) @method = method @name = name end |
Instance Attribute Details
#name ⇒ String (readonly)
9 10 11 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 9 def name @name end |
Instance Method Details
#block? ⇒ Boolean
Returns true
if the parameter is a block.
20 21 22 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 20 def block? false end |
#described? ⇒ Boolean
Returns true
if an additional description is given?.
25 26 27 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 25 def described? described_by_docstring? end |
#mentioned? ⇒ Boolean
Returns true
if the parameter is mentioned in the docs.
31 32 33 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 31 def mentioned? mentioned_by_docstring? end |
#splat? ⇒ Boolean
Returns true
if the parameter is a splat argument.
36 37 38 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 36 def splat? false end |
#typed? ⇒ Boolean
Returns true
if the type of the parameter is defined.
41 42 43 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 41 def typed? false # TODO: parse types of params end |
#wrongly_mentioned? ⇒ Boolean
Returns true
if the parameter is mentioned in the docs, but not present in the method’s signature.
47 48 49 |
# File 'lib/inch/language/elixir/provider/reader/object/function_parameter_object.rb', line 47 def wrongly_mentioned? false end |