Class: DeadCodeTerminator::Cond::Base

Inherits:
Object
  • Object
show all
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.



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

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

Instance Attribute Details

#astObject (readonly)

Returns the value of attribute ast.



9
10
11
# File 'lib/dead_code_terminator/cond/base.rb', line 9

def ast
  @ast
end

#envObject (readonly)

Returns the value of attribute env.



9
10
11
# File 'lib/dead_code_terminator/cond/base.rb', line 9

def env
  @env
end

Instance Method Details

#valueObject



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

def value; end