Class: CodeMiner::DestructuredParamExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/codeminer/expressions/destructured_param_expression.rb

Instance Attribute Summary

Attributes inherited from Expression

#args, #block, #delimiter, #src, #token

Instance Method Summary collapse

Methods inherited from Expression

not_implemented

Methods included from SourceExtract::Usage

#adjust_src, #column, #column=, #end_column, #end_column=, #end_line, #end_line=, #line, #line=, #src, #src_extract

Constructor Details

#initialize(token, src) ⇒ DestructuredParamExpression

Returns a new instance of DestructuredParamExpression.



5
6
7
8
# File 'lib/codeminer/expressions/destructured_param_expression.rb', line 5

def initialize(token, src)
  @token = token
  @src = src
end

Instance Method Details

#eachObject



18
19
20
# File 'lib/codeminer/expressions/destructured_param_expression.rb', line 18

def each
  []
end

#typeObject



14
15
16
# File 'lib/codeminer/expressions/destructured_param_expression.rb', line 14

def type
  :destructured_param
end

#valueObject



10
11
12
# File 'lib/codeminer/expressions/destructured_param_expression.rb', line 10

def value
  @token.value
end