Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/opal/d3.rb

Instance Method Summary collapse

Instance Method Details

#alias_d3(ruby_name, js_name = ruby_name) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/opal/d3.rb', line 5

def alias_d3(ruby_name, js_name=ruby_name)
  eval <<-EOF
    def #{ruby_name}(*args)
      @d3.JS.#{js_name}(*args)
    end
  EOF
end