Class: CTioga2::Graphics::Elements::TiogaPrimitiveCall::TiogaPrimitive
- Inherits:
-
Object
- Object
- CTioga2::Graphics::Elements::TiogaPrimitiveCall::TiogaPrimitive
- Defined in:
- lib/ctioga2/graphics/elements/primitive.rb
Overview
Some kind of reimplementation of Command for graphics primitives
Instance Attribute Summary collapse
-
#compulsory_arguments ⇒ Object
An array of compulsory arguments (type specifications).
-
#funcall ⇒ Object
A block that will receive a FigureMaker object, the compulsory arguments and a hash containing optional ones.
-
#name ⇒ Object
A name (not very useful, but, well, we never know).
-
#optional_arguments ⇒ Object
A hash of optional arguments.
-
#primitive_class ⇒ Object
The underlying nameless class.
Instance Method Summary collapse
-
#initialize(name, comp, opts = {}, &code) ⇒ TiogaPrimitive
constructor
Creates a TiogaPrimitive object.
Constructor Details
#initialize(name, comp, opts = {}, &code) ⇒ TiogaPrimitive
Creates a TiogaPrimitive object
58 59 60 61 62 63 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 58 def initialize(name, comp, opts = {}, &code) @name = name @compulsory_arguments = comp @optional_arguments = opts @funcall = code end |
Instance Attribute Details
#compulsory_arguments ⇒ Object
An array of compulsory arguments (type specifications)
45 46 47 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 45 def compulsory_arguments @compulsory_arguments end |
#funcall ⇒ Object
A block that will receive a FigureMaker object, the compulsory arguments and a hash containing optional ones.
52 53 54 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 52 def funcall @funcall end |
#name ⇒ Object
A name (not very useful, but, well, we never know)
42 43 44 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 42 def name @name end |
#optional_arguments ⇒ Object
A hash of optional arguments
48 49 50 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 48 def optional_arguments @optional_arguments end |
#primitive_class ⇒ Object
The underlying nameless class
55 56 57 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 55 def primitive_class @primitive_class end |