Skip to content

Hash parameters in custom functions #204

@hashwin

Description

@hashwin

Here I have a custom function "test"

c = Dentaku::Calculator.new
c.add_function(:test, :string, ->(test_hash) { test_hash.values.join })
c.evaluate("TEST(abc)", { abc: { a: '1', b: '2', c: '3' }})

I would expect the result of this to be "123", but it is returning nil. In fact, it does not even enter the custom function if there is a hash parameter.

Is there something I am missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions