Module: Mayu::State::ActionCreator

Extended by:
T::Sig
Defined in:
lib/mayu/state/action_creator.rb

Defined Under Namespace

Modules: ActionContext Classes: AsyncActionCreator, Base, PreparedActionCreator, StaticActionCreator

Class Method Summary collapse

Class Method Details

.async(type, &block) ⇒ Object



186
187
188
# File 'lib/mayu/state/action_creator.rb', line 186

def self.async(type, &block)
  AsyncActionCreator.new(type, &block)
end

.create(type, &block) ⇒ Object



173
174
175
176
177
178
179
# File 'lib/mayu/state/action_creator.rb', line 173

def self.create(type, &block)
  if block_given?
    PreparedActionCreator.new(type, &block)
  else
    StaticActionCreator.new(type)
  end
end