Module: Musa::Neumalang::Neumalang::Parser::CallMethodsExpression 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 method call chains.

Transforms method call chains like "object.method1.method2". Enables fluent interface notation in Neumalang.

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 method call chain structure.

Returns:

  • (Hash)

    call_methods with kind :call_methods, methods array, and target object



421
422
423
424
425
# File 'lib/musa-dsl/neumalang/neumalang.rb', line 421

def value
  { kind: :call_methods,
    call_methods: captures(:method_call).collect(&:value),
    on: capture(:object_expression).value }.extend Musa::Neumas::Neuma
end