Class: DeadCodeTerminator::Cond::Base

Inherits:
Object
  • Object
show all
Includes:
AST::Sexp
Defined in:
lib/dead_code_terminator/cond/base.rb

Direct Known Subclasses

EnvFetch, EnvIndex, Literal

Constant Summary collapse

THEN =
:then
ELSE =
:else

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env:, ast:) ⇒ Base

Returns a new instance of Base.



13
14
15
16
# File 'lib/dead_code_terminator/cond/base.rb', line 13

def initialize(env:, ast:)
  @env = env
  @ast = ast
end

Instance Attribute Details

#astObject (readonly)

Returns the value of attribute ast.



11
12
13
# File 'lib/dead_code_terminator/cond/base.rb', line 11

def ast
  @ast
end

#envObject (readonly)

Returns the value of attribute env.



11
12
13
# File 'lib/dead_code_terminator/cond/base.rb', line 11

def env
  @env
end

Instance Method Details

#valueObject



18
# File 'lib/dead_code_terminator/cond/base.rb', line 18

def value; end