Class: Yardcheck::MethodCall

Inherits:
Object
  • Object
show all
Includes:
AbstractType
Defined in:
lib/yardcheck/method_call.rb

Direct Known Subclasses

Jump, Raise, Return

Defined Under Namespace

Classes: Jump, Raise, Return

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.process(params:, **attributes) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/yardcheck/method_call.rb', line 13

def self.process(params:, **attributes)
  params =
    params.map do |key, value|
      [key, TestValue.process(value)]
    end.to_h

  new(params: params, **attributes)
end

Instance Method Details

#example_idObject



26
27
28
# File 'lib/yardcheck/method_call.rb', line 26

def example_id
  .fetch(:id)
end

#example_locationObject



22
23
24
# File 'lib/yardcheck/method_call.rb', line 22

def example_location
  .fetch(:location)
end

#initialize?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/yardcheck/method_call.rb', line 34

def initialize?
  selector == :initialize && scope == :instance
end

#method_identifierObject



30
31
32
# File 'lib/yardcheck/method_call.rb', line 30

def method_identifier
  [namespace, selector, scope]
end

#raise?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/yardcheck/method_call.rb', line 38

def raise?
  false
end

#return?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/yardcheck/method_call.rb', line 42

def return?
  false
end