Module: Musa::Neumalang::Neumalang::Parser::BracedCommand Private

Defined in:
lib/musa-dsl/neumalang/neumalang.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Semantic action for braced Ruby commands.

Transforms { ruby code } into executable proc. Evaluates Ruby code string to create proc object.

Instance Method Summary collapse

Instance Method Details

#valueHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Builds command structure with evaluated proc.

Returns:

  • (Hash)

    command with kind :command and executable proc



400
401
402
403
404
# File 'lib/musa-dsl/neumalang/neumalang.rb', line 400

def value
  { kind: :command,
    command: eval("proc { #{capture(:complex_command).value.strip} }")
  }.merge(capture(:parameters) ? capture(:parameters).value : {}).extend Musa::Neumas::Neuma
end