File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import Text2SpeechBlocks from './text2speech.js';
2323import TranslateBlocks from './translate.js' ;
2424import MakeyMakeyBlocks from './makeymakey.js' ;
2525import MicrobitBlocks from './microbit.js' ;
26+ import WeDo2Blocks from './wedo2.js' ;
2627
2728const SCALAR_TYPE = '' ;
2829const LIST_TYPE = 'list' ;
@@ -448,5 +449,6 @@ Text2SpeechBlocks(RubyGenerator);
448449TranslateBlocks ( RubyGenerator ) ;
449450MakeyMakeyBlocks ( RubyGenerator ) ;
450451MicrobitBlocks ( RubyGenerator ) ;
452+ WeDo2Blocks ( RubyGenerator ) ;
451453
452454export default RubyGenerator ;
Original file line number Diff line number Diff line change 1+ /**
2+ * Define Ruby code generator for WeDo 2.0 Blocks
3+ * @param {RubyGenerator } Generator The RubyGenerator
4+ * @return {RubyGenerator } same as param.
5+ */
6+ export default function ( Generator ) {
7+ Generator . wedo2_getDistance = function ( block ) {
8+ return [ `wedo2_distance` , Generator . ORDER_ATOMIC ] ;
9+ } ;
10+
11+ return Generator ;
12+ }
You can’t perform that action at this time.
0 commit comments