Class: Simplabs::Excellent::Parsing::IfContext

Inherits:
ConditionalContext show all
Defined in:
lib/simplabs/excellent/parsing/if_context.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from SexpContext

#file, #line, #name, #parent

Instance Method Summary collapse

Methods inherited from SexpContext

#full_name, #method_missing

Constructor Details

#initialize(exp, parent) ⇒ IfContext

Returns a new instance of IfContext.



11
12
13
14
15
# File 'lib/simplabs/excellent/parsing/if_context.rb', line 11

def initialize(exp, parent)
  super
  @contains_assignment = has_assignment?
  @tests_parameter     = contains_parameter?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Simplabs::Excellent::Parsing::SexpContext

Instance Method Details

#tests_assignment?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/simplabs/excellent/parsing/if_context.rb', line 17

def tests_assignment?
  @contains_assignment
end

#tests_parameter?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/simplabs/excellent/parsing/if_context.rb', line 21

def tests_parameter?
  @tests_parameter
end