Class: BlocklyInterpreter::GenericBlockDSLGenerator

Inherits:
Object
  • Object
show all
Includes:
DSLGenerator
Defined in:
lib/blockly_interpreter/generic_block_dsl_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ GenericBlockDSLGenerator

Returns a new instance of GenericBlockDSLGenerator.



6
7
8
# File 'lib/blockly_interpreter/generic_block_dsl_generator.rb', line 6

def initialize(block)
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



4
5
6
# File 'lib/blockly_interpreter/generic_block_dsl_generator.rb', line 4

def block
  @block
end

Instance Method Details

#dslObject



10
11
12
# File 'lib/blockly_interpreter/generic_block_dsl_generator.rb', line 10

def dsl
  method_call_with_possible_block("block", block.class.block_type.to_sym.inspect, block_contents)
end