Class: Simplabs::Excellent::Parsing::CaseContext
- Inherits:
-
ConditionalContext
- Object
- SexpContext
- ConditionalContext
- Simplabs::Excellent::Parsing::CaseContext
- Defined in:
- lib/simplabs/excellent/parsing/case_context.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from SexpContext
Instance Method Summary collapse
- #has_else_clause? ⇒ Boolean
-
#initialize(exp, parent) ⇒ CaseContext
constructor
A new instance of CaseContext.
- #tests_parameter? ⇒ Boolean
Methods inherited from SexpContext
Constructor Details
#initialize(exp, parent) ⇒ CaseContext
Returns a new instance of CaseContext.
11 12 13 14 15 |
# File 'lib/simplabs/excellent/parsing/case_context.rb', line 11 def initialize(exp, parent) super @has_else_clause = exp.last @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
#has_else_clause? ⇒ Boolean
17 18 19 |
# File 'lib/simplabs/excellent/parsing/case_context.rb', line 17 def has_else_clause? @has_else_clause end |
#tests_parameter? ⇒ Boolean
21 22 23 |
# File 'lib/simplabs/excellent/parsing/case_context.rb', line 21 def tests_parameter? @tests_parameter end |