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.
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
51 52 53 54 55 56 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 51 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)
41 42 43 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 41 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.
48 49 50 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 48 def funcall @funcall end |
#name ⇒ Object
A name (not very useful, but, well, we never know)
38 39 40 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 38 def name @name end |
#optional_arguments ⇒ Object
A hash of optional arguments
44 45 46 |
# File 'lib/ctioga2/graphics/elements/primitive.rb', line 44 def optional_arguments @optional_arguments end |