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 @@ -25,6 +25,7 @@ import MakeyMakeyBlocks from './makeymakey.js';
25
25
import MicrobitBlocks from './microbit.js' ;
26
26
import BoostBlocks from './boost.js' ;
27
27
import EV3Blocks from './ev3.js'
28
+ import WeDo2Blocks from './wedo2.js' ;
28
29
29
30
const SCALAR_TYPE = '' ;
30
31
const LIST_TYPE = 'list' ;
@@ -452,5 +453,6 @@ MakeyMakeyBlocks(RubyGenerator);
452
453
MicrobitBlocks ( RubyGenerator ) ;
453
454
BoostBlocks ( RubyGenerator ) ;
454
455
EV3Blocks ( RubyGenerator ) ;
456
+ WeDo2Blocks ( RubyGenerator ) ;
455
457
456
458
export 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