Class: RubyPost::Pen

Inherits:
Option show all
Defined in:
lib/options.rb

Overview

wraps the metapost withpen command

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Parameters:

  • value

    the value to set the attribute pen_type to.



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

Parameters:

  • value

    the value to set the attribute scale to.



58
59
60
# File 'lib/options.rb', line 58

def scale=(value)
  @scale = value
end

Instance Method Details

#compileObject



65
66
67
# File 'lib/options.rb', line 65

def compile
  'withpen ' + @pen_type + ' scaled ' + @scale.compile
end