cowboyd / handlebars.rb

Ruby Bindings for Handlebars.js
http://www.handlebarsjs.com
161 stars 67 forks source link

Support for keyword arguments with default values #47

Closed simonc closed 3 years ago

simonc commented 6 years ago

Here is how to reproduce this problem

class Greeting
  def hello(name: 'John Doe')
    "Hello #{name}"
  end
end

greeting = Greeting.new
Handlebars::Context.new.compile("{{hello}}").call(greeting)
# V8::Error: wrong number of arguments (given 1, expected 0)

I would expect it to return "Hello John Doe" but instead it raises an exception.

simonc commented 3 years ago

No activity in several years. Closing this.