Class: RubyToBlock::Block::MotionSetX
- Inherits:
-
CharacterMethodCall
- Object
- Base
- CharacterMethodCall
- RubyToBlock::Block::MotionSetX
- Defined in:
- app/models/concerns/ruby_to_block/block/motion_set_x.rb
Constant Summary
Constants included from CharacterOperation
Instance Attribute Summary
Attributes included from CharacterOperation
Attributes inherited from Base
#fields, #parent, #prev_sibling, #sibling, #statements, #values
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from CharacterMethodCall
add_character_method_call_block
Methods inherited from Base
#[], #add_statement, #add_value, blocknize, indent?, #indent_level, inherited, #initialize, inline?, #inline?, #null?, priority, process_else, process_end, process_value_string, regexp, statement?, #to_xml, type, value?
Constructor Details
This class inherits a constructor from RubyToBlock::Block::Base
Class Method Details
.process_match_data(md, context) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/concerns/ruby_to_block/block/motion_set_x.rb', line 8 def self.process_match_data(md, context) md2 = regexp.match(md[type]) block = add_character_method_call_block(context, md2[1], new, X: md2[2]) md3 = MotionSetY.regexp.match(context.look_next_line) process_motion_set_y(context, block, md3) if md3 true end |
Instance Method Details
#type ⇒ Object
29 30 31 32 33 34 35 |
# File 'app/models/concerns/ruby_to_block/block/motion_set_x.rb', line 29 def type if @values.key?(:Y) 'motion_set_x_y' else super end end |