class Dentaku::AST::CaseConditional
Attributes
then[R]
when[R]
Public Class Methods
max_param_count()
click to toggle source
# File lib/dentaku/ast/case/case_conditional.rb, line 13 def self.max_param_count 2 end
min_param_count()
click to toggle source
# File lib/dentaku/ast/case/case_conditional.rb, line 9 def self.min_param_count 2 end
new(when_statement, then_statement)
click to toggle source
# File lib/dentaku/ast/case/case_conditional.rb, line 17 def initialize(when_statement, then_statement) @when = when_statement unless @when.is_a?(AST::CaseWhen) raise ParseError.for(:node_invalid), 'Expected first argument to be a CaseWhen' end @then = then_statement unless @then.is_a?(AST::CaseThen) raise ParseError.for(:node_invalid), 'Expected second argument to be a CaseThen' end end
Public Instance Methods
accept(visitor)
click to toggle source
# File lib/dentaku/ast/case/case_conditional.rb, line 33 def accept(visitor) visitor.visit_case_conditional(self) end
dependencies(context = {})
click to toggle source
# File lib/dentaku/ast/case/case_conditional.rb, line 29 def dependencies(context = {}) @when.dependencies(context) + @then.dependencies(context) end