Class: RubyToBlock::Block::Do
- Inherits:
-
RubyStatement
- Object
- Base
- RubyStatement
- RubyToBlock::Block::Do
- Defined in:
- app/models/concerns/ruby_to_block/block/do.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#fields, #parent, #prev_sibling, #sibling, #statements, #values
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#[], #add_statement, #add_value, blocknize, indent?, #indent_level, inherited, #initialize, inline?, #inline?, #null?, priority, process_else, process_value_string, regexp, statement?, #to_xml, type, value?
Constructor Details
This class inherits a constructor from RubyToBlock::Block::Base
Class Method Details
.process_end(context) ⇒ Object
14 15 16 17 |
# File 'app/models/concerns/ruby_to_block/block/do.rb', line 14 def self.process_end(context) context.add_block(new(fields: { STATEMENT: 'end' })) super end |
.process_match_data(md, context) ⇒ Object
7 8 9 10 11 12 |
# File 'app/models/concerns/ruby_to_block/block/do.rb', line 7 def self.process_match_data(md, context) block = new(fields: { STATEMENT: md.string }) context.add_block(block) context.statement_stack.push([type, block]) true end |
Instance Method Details
#type ⇒ Object
19 20 21 |
# File 'app/models/concerns/ruby_to_block/block/do.rb', line 19 def type 'ruby_statement' end |