Class: RubyPost::Pen
Overview
wraps the metapost withpen command
Instance Attribute Summary collapse
-
#pen_type ⇒ Object
writeonly
Sets the attribute pen_type.
-
#scale ⇒ Object
writeonly
Sets the attribute scale.
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(pt = 'pencircle', scale = 1) ⇒ Pen
constructor
A new instance of Pen.
Constructor Details
#initialize(pt = 'pencircle', scale = 1) ⇒ Pen
Returns a new instance of Pen.
60 61 62 63 |
# File 'lib/options.rb', line 60 def initialize(pt='pencircle', scale = 1) @pen_type = pt @scale = scale end |
Instance Attribute Details
#pen_type=(value) ⇒ Object (writeonly)
Sets the attribute pen_type
58 59 60 |
# File 'lib/options.rb', line 58 def pen_type=(value) @pen_type = value end |
#scale=(value) ⇒ Object (writeonly)
Sets the attribute scale
58 59 60 |
# File 'lib/options.rb', line 58 def scale=(value) @scale = value end |
Instance Method Details
#compile ⇒ Object
65 66 67 |
# File 'lib/options.rb', line 65 def compile 'withpen ' + @pen_type + ' scaled ' + @scale.compile end |