Class: DeadCodeTerminator::Cond::Literal

Inherits:
Base
  • Object
show all
Defined in:
lib/dead_code_terminator/cond/literal.rb

Constant Summary

Constants inherited from Base

Base::ELSE, Base::THEN

Instance Attribute Summary

Attributes inherited from Base

#ast, #env

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from DeadCodeTerminator::Cond::Base

Instance Method Details

#valueObject



6
7
8
9
# File 'lib/dead_code_terminator/cond/literal.rb', line 6

def value
  return THEN if ast.type == :true
  return ELSE if ast.type == :false
end