@@ -712,27 +712,35 @@ class RubyToBlocksConverter {
712712 case 'push' :
713713 if ( args . length === 1 &&
714714 this . _isStringOrBlock ( args [ 0 ] ) ) {
715- block = this . _changeVariableBlock ( receiver , 'data_addtolist' , 'statement' , Variable . LIST_TYPE ) ;
715+ block = this . _changeVariableBlock (
716+ receiver , 'data_addtolist' , 'statement' , Variable . LIST_TYPE
717+ ) ;
716718 this . _addInput ( block , 'ITEM' , this . _createTextBlock ( args [ 0 ] , block . id ) ) ;
717719 }
718720 break ;
719721 case 'delete_at' :
720722 if ( args . length === 1 &&
721723 this . _isNumberOrBlock ( args [ 0 ] ) ) {
722- block = this . _changeVariableBlock ( receiver , 'data_deleteoflist' , 'statement' , Variable . LIST_TYPE ) ;
724+ block = this . _changeVariableBlock (
725+ receiver , 'data_deleteoflist' , 'statement' , Variable . LIST_TYPE
726+ ) ;
723727 this . _addInput ( block , 'INDEX' , this . _createNumberBlock ( 'math_number' , args [ 0 ] , block . id ) ) ;
724728 }
725729 break ;
726730 case 'clear' :
727731 if ( args . length === 0 ) {
728- block = this . _changeVariableBlock ( receiver , 'data_deletealloflist' , 'statement' , Variable . LIST_TYPE ) ;
732+ block = this . _changeVariableBlock (
733+ receiver , 'data_deletealloflist' , 'statement' , Variable . LIST_TYPE
734+ ) ;
729735 }
730736 break ;
731737 case 'insert' :
732738 if ( args . length === 2 &&
733739 this . _isNumberOrBlock ( args [ 0 ] ) &&
734740 this . _isStringOrBlock ( args [ 1 ] ) ) {
735- block = this . _changeVariableBlock ( receiver , 'data_insertatlist' , 'statement' , Variable . LIST_TYPE ) ;
741+ block = this . _changeVariableBlock (
742+ receiver , 'data_insertatlist' , 'statement' , Variable . LIST_TYPE
743+ ) ;
736744 this . _addInput ( block , 'INDEX' , this . _createNumberBlock ( 'math_number' , args [ 0 ] , block . id ) ) ;
737745 this . _addInput ( block , 'ITEM' , this . _createTextBlock ( args [ 1 ] , block . id ) ) ;
738746 }
@@ -741,34 +749,44 @@ class RubyToBlocksConverter {
741749 if ( args . length === 2 &&
742750 this . _isNumberOrBlock ( args [ 0 ] ) &&
743751 this . _isStringOrBlock ( args [ 1 ] ) ) {
744- block = this . _changeVariableBlock ( receiver , 'data_replaceitemoflist' , 'statement' , Variable . LIST_TYPE ) ;
752+ block = this . _changeVariableBlock (
753+ receiver , 'data_replaceitemoflist' , 'statement' , Variable . LIST_TYPE
754+ ) ;
745755 this . _addInput ( block , 'INDEX' , this . _createNumberBlock ( 'math_number' , args [ 0 ] , block . id ) ) ;
746756 this . _addInput ( block , 'ITEM' , this . _createTextBlock ( args [ 1 ] , block . id ) ) ;
747757 }
748758 break ;
749759 case '[]' :
750760 if ( args . length === 1 &&
751761 this . _isNumberOrBlock ( args [ 0 ] ) ) {
752- block = this . _changeVariableBlock ( receiver , 'data_itemoflist' , 'value' , Variable . LIST_TYPE ) ;
762+ block = this . _changeVariableBlock (
763+ receiver , 'data_itemoflist' , 'value' , Variable . LIST_TYPE
764+ ) ;
753765 this . _addInput ( block , 'INDEX' , this . _createNumberBlock ( 'math_number' , args [ 0 ] , block . id ) ) ;
754766 }
755767 break ;
756768 case 'index' :
757769 if ( args . length === 1 &&
758770 this . _isStringOrBlock ( args [ 0 ] ) ) {
759- block = this . _changeVariableBlock ( receiver , 'data_itemnumoflist' , 'value' , Variable . LIST_TYPE ) ;
771+ block = this . _changeVariableBlock (
772+ receiver , 'data_itemnumoflist' , 'value' , Variable . LIST_TYPE
773+ ) ;
760774 this . _addInput ( block , 'ITEM' , this . _createTextBlock ( args [ 0 ] , block . id ) ) ;
761775 }
762776 break ;
763777 case 'length' :
764778 if ( args . length === 0 ) {
765- block = this . _changeVariableBlock ( receiver , 'data_lengthoflist' , 'value' , Variable . LIST_TYPE ) ;
779+ block = this . _changeVariableBlock (
780+ receiver , 'data_lengthoflist' , 'value' , Variable . LIST_TYPE
781+ ) ;
766782 }
767783 break ;
768784 case 'include?' :
769785 if ( args . length === 1 &&
770786 this . _isStringOrBlock ( args [ 0 ] ) ) {
771- block = this . _changeVariableBlock ( receiver , 'data_listcontainsitem' , 'value' , Variable . LIST_TYPE ) ;
787+ block = this . _changeVariableBlock (
788+ receiver , 'data_listcontainsitem' , 'value' , Variable . LIST_TYPE
789+ ) ;
772790 this . _addInput ( block , 'ITEM' , this . _createTextBlock ( args [ 0 ] , block . id ) ) ;
773791 }
774792 break ;
0 commit comments