Class: D3::LineGenerator

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

Instance Method Summary collapse

Methods included from Native

included, #initialize

Instance Method Details

#call(*args) ⇒ Object



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

def call(*args)
  result = @native.call(*args)
  `result === null ? nil : result`
end

#curve(new_value = `undefined`) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/opal/d3/line.rb', line 14

def curve(new_value=`undefined`)
  if `new_value === undefined`
    D3::Curve.new @native.JS.curve
  else
    @native.JS.curve(new_value.to_n)
    self
  end
end