Sha256: af02e419de167a63e8c34e809c144b6458a6e5c2f80352237289b4ce145ce075

Contents?: true

Size: 745 Bytes

Versions: 69

Compression:

Stored size: 745 Bytes

Contents

module RubyToBlock
  module Block
    class CharacterEvent < CharacterMethodCall
      def self.process_end(context)
        context.receiver_stack.pop
        context.character_stack.pop
        super
      end

      def self.add_character_event_blocks(context, name, block)
        do_block = Block.new('null')
        block.add_statement(:DO, do_block)

        character = get_character(context, name)
        context.character_stack.push(character)

        character_new_block, _ =
          add_child_or_create_character_new_block(context, name, block)

        context.receiver_stack.push(character)

        context.statement_stack.push([type, character_new_block])
        context.current_block = do_block
      end
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
smalruby-editor-0.1.11-x86-mingw32 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.10-x86-mingw32 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.10 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.9-x86-mingw32 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.9 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.8-x86-mingw32 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.8 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.7-x86-mingw32 app/models/concerns/ruby_to_block/block/character_event.rb
smalruby-editor-0.1.7 app/models/concerns/ruby_to_block/block/character_event.rb