Class: BlocklyInterpreter::ExtensionBlocks::ListsIncludeOperatorBlock::DSLGenerator
- Inherits:
-
DSL::BinaryOperationDSLGenerator
- Object
- DSL::BinaryOperationDSLGenerator
- BlocklyInterpreter::ExtensionBlocks::ListsIncludeOperatorBlock::DSLGenerator
- Defined in:
- lib/blockly_interpreter/extension_blocks/lists_include_operator_block.rb
Instance Attribute Summary
Attributes inherited from DSL::BinaryOperationDSLGenerator
Instance Method Summary collapse
- #dsl_method_name ⇒ Object
-
#initialize(block) ⇒ DSLGenerator
constructor
A new instance of DSLGenerator.
- #method_args ⇒ Object
Methods inherited from DSL::BinaryOperationDSLGenerator
#block_contents, #cast_operands, #castable_static_value, #dsl, #value_block
Methods included from DSLGenerator
#deep_flatten, #formatted_keyword_args, #indent, #keyword_args_without_defaults, #method_call, #method_call_with_block_or_nothing, #method_call_with_possible_block, #start_block_to_dsl, #strip_trailing_whitespace, #timestamp_to_dsl
Constructor Details
#initialize(block) ⇒ DSLGenerator
Returns a new instance of DSLGenerator.
15 16 17 |
# File 'lib/blockly_interpreter/extension_blocks/lists_include_operator_block.rb', line 15 def initialize(block) super(block, nil) end |
Instance Method Details
#dsl_method_name ⇒ Object
19 20 21 22 23 24 |
# File 'lib/blockly_interpreter/extension_blocks/lists_include_operator_block.rb', line 19 def dsl_method_name case block.fields['OP'] when 'INCLUDE' then "lists_include" when 'NINCLUDE' then "lists_not_include" end end |
#method_args ⇒ Object
26 27 28 29 |
# File 'lib/blockly_interpreter/extension_blocks/lists_include_operator_block.rb', line 26 def method_args args = super args.slice(1, args.size - 1) end |