class SheepAst::ActionFactory
Match fatiory
Attributes
analyzer_core[RW]
data_store[RW]
Public Class Methods
new()
click to toggle source
Calls superclass method
SheepAst::FactoryBase::new
# File lib/sheep_ast/action/action_factory.rb, line 25 def initialize super() @no_action = NoAction.new @let = Let.new @my_name = 'action_factory' end
Public Instance Methods
gen(kind, *para, **kwargs)
click to toggle source
# File lib/sheep_ast/action/action_factory.rb, line 37 def gen(kind, *para, **kwargs) # rubocop: disable all action = case kind when :na then @no_action.new(*para, **kwargs) when :let then @let.new(*para, **kwargs) else application_error 'unknown action' end create_id(action) action.data_store = @data_store action.analyzer_core = @analyzer_core action.action_factory = self action.match_factory = my_factory.match_factory return action end