Class: Java::javafx::scene::shape::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/jrubyfx/core_ext/path.rb

Overview

JRubyFX DSL extensions for JavaFX Paths

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object

This will defer to node to construct proper object, but will optionally add paths primary child automatically if it is a PathElement.



28
29
30
31
32
33
34
35
36
# File 'lib/jrubyfx/core_ext/path.rb', line 28

def method_missing(name, *args, &block)
  super.tap do |obj|
    if obj.kind_of? PathElement
      add(obj)
    elsif obj.kind_of? Transform
      transforms << obj
    end
  end
end