These are chat archives for opal/opal

26th
Aug 2016
Bernhard Weichel
@bwl21
Aug 26 2016 18:56

@fkchang sure, But I thought of using string interpolation in the function body. Something like this.

module Foo

  %x{function do_something(){alert(#{I18n.t('string to translate')})}}

  def self.do_something()
    alert("editing #{$conf['Foo']}")
  end

  def self.foobar()
    `do_something()`
  end

end

Yes one might discuss if we have a proper architecture if we need stuff like that ... but this is another issue. Nevertheless, I see there is no need to force myself to do everything in Ruby.