Class: Spoom::Deadcode::Reference

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/spoom/deadcode/reference.rb

Overview

A reference is a call to a method or a constant

Defined Under Namespace

Classes: Kind

Instance Method Summary collapse

Instance Method Details

#constant?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/spoom/deadcode/reference.rb', line 24

def constant?
  kind == Kind::Constant
end

#method?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/spoom/deadcode/reference.rb', line 29

def method?
  kind == Kind::Method
end