Class: RubyPost::AutoGrid

Inherits:
Drawable show all
Defined in:
lib/graph.rb

Overview

set the position and type of grid tick marks and labels

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x = String.new, y = String.new) ⇒ AutoGrid

Returns a new instance of AutoGrid.



246
247
248
249
250
# File 'lib/graph.rb', line 246

def initialize(x=String.new, y=String.new)
  super()
  @x = x
  @y = y
end

Instance Attribute Details

#x=(value) ⇒ Object (writeonly)

Sets the attribute x

Parameters:

  • value

    the value to set the attribute x to.



244
245
246
# File 'lib/graph.rb', line 244

def x=(value)
  @x = value
end

#y=(value) ⇒ Object (writeonly)

Sets the attribute y

Parameters:

  • value

    the value to set the attribute y to.



244
245
246
# File 'lib/graph.rb', line 244

def y=(value)
  @y = value
end

Instance Method Details

#compileObject



252
253
254
# File 'lib/graph.rb', line 252

def compile
  'autogrid(' + @x + ', ' + @y + ")" + compile_options + ";\n"
end