Class: Spoom::Deadcode::Definition
- Inherits:
-
T::Struct
- Object
- T::Struct
- Spoom::Deadcode::Definition
- Extended by:
- T::Sig
- Defined in:
- lib/spoom/deadcode/definition.rb
Overview
A definition is a class, module, method, constant, etc. being defined in the code
Defined Under Namespace
Instance Method Summary collapse
- #alive! ⇒ Object
- #alive? ⇒ Boolean
- #attr_reader? ⇒ Boolean
- #attr_writer? ⇒ Boolean
- #class? ⇒ Boolean
- #constant? ⇒ Boolean
- #dead? ⇒ Boolean
- #ignored! ⇒ Object
- #ignored? ⇒ Boolean
- #method? ⇒ Boolean
- #module? ⇒ Boolean
Instance Method Details
#alive! ⇒ Object
78 79 80 |
# File 'lib/spoom/deadcode/definition.rb', line 78 def alive! @status = Status::ALIVE end |
#alive? ⇒ Boolean
73 74 75 |
# File 'lib/spoom/deadcode/definition.rb', line 73 def alive? status == Status::ALIVE end |
#attr_reader? ⇒ Boolean
41 42 43 |
# File 'lib/spoom/deadcode/definition.rb', line 41 def attr_reader? kind == Kind::AttrReader end |
#attr_writer? ⇒ Boolean
46 47 48 |
# File 'lib/spoom/deadcode/definition.rb', line 46 def attr_writer? kind == Kind::AttrWriter end |
#class? ⇒ Boolean
51 52 53 |
# File 'lib/spoom/deadcode/definition.rb', line 51 def class? kind == Kind::Class end |
#constant? ⇒ Boolean
56 57 58 |
# File 'lib/spoom/deadcode/definition.rb', line 56 def constant? kind == Kind::Constant end |
#dead? ⇒ Boolean
83 84 85 |
# File 'lib/spoom/deadcode/definition.rb', line 83 def dead? status == Status::DEAD end |
#ignored! ⇒ Object
93 94 95 |
# File 'lib/spoom/deadcode/definition.rb', line 93 def ignored! @status = Status::IGNORED end |
#ignored? ⇒ Boolean
88 89 90 |
# File 'lib/spoom/deadcode/definition.rb', line 88 def ignored? status == Status::IGNORED end |
#method? ⇒ Boolean
61 62 63 |
# File 'lib/spoom/deadcode/definition.rb', line 61 def method? kind == Kind::Method end |
#module? ⇒ Boolean
66 67 68 |
# File 'lib/spoom/deadcode/definition.rb', line 66 def module? kind == Kind::Module end |