Class: DTRToRust::Instruction::CreateList
- Defined in:
- lib/instruction/create_list.rb
Overview
This class is responsible for generating Rust code for the AddAndAssign instruction.
Instance Method Summary collapse
Methods inherited from Handler
#form_rust_string, handle, #initialize, #spacing
Constructor Details
This class inherits a constructor from DTRToRust::Instruction::Handler
Instance Method Details
#handle ⇒ Object
7 8 9 10 |
# File 'lib/instruction/create_list.rb', line 7 def handle form_rust_string("let #{@instruction[:assign]} = vec![#{@instruction[:inputs].join(', ')}];", @instruction[:scope]) end |