Class: RubyPost::GraphFile

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

Overview

Implements the graph data filename macro

Direct Known Subclasses

GraphData

Instance Attribute Summary collapse

Attributes inherited from BaseDrawCommand

#drawable

Instance Method Summary collapse

Methods inherited from BaseGraphData

#add_coords, #add_grid, #add_label, #add_post_command, #add_pre_command, #add_range, #compile_post_commands, #compile_pre_commands

Methods inherited from BaseDrawCommand

#add_option, #color, #colour, #compile_options, #rotate, #scale, #set_drawable, #translate

Constructor Details

#initialize(filename = nil) ⇒ GraphFile

Returns a new instance of GraphFile.



112
113
114
115
# File 'lib/graph.rb', line 112

def initialize(filename=nil)
  super()
  @filename = filename
end

Instance Attribute Details

#filename=(value) ⇒ Object (writeonly)

Sets the attribute filename

Parameters:

  • value

    the value to set the attribute filename to.



110
111
112
# File 'lib/graph.rb', line 110

def filename=(value)
  @filename = value
end

Instance Method Details

#compileObject



117
118
119
# File 'lib/graph.rb', line 117

def compile
  "\"" + @filename + "\" " + compile_options + ";"
end