Class: VIPS::CSVWriter

Inherits:
Writer
  • Object
show all
Defined in:
lib/vips/writer.rb,
ext/writer.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Writer

#exif=, #icc=, #image, #remove_exif, #remove_icc

Methods included from Header

#band_fmt, #bands, #exif, #exif?, #get, #icc, #icc?, #n_elements, #set, #sizeof_element, #sizeof_line, #sizeof_pel, #x_offset, #x_res, #x_size, #y_offset, #y_res, #y_size

Constructor Details

#initialize(image, options = {}) ⇒ CSVWriter

Returns a new instance of CSVWriter.



34
35
36
37
38
39
# File 'lib/vips/writer.rb', line 34

def initialize(image, options={})
  super image
  @separator = "\t"

  self.separator = options[:separator] if options.has_key?(:separator)
end

Instance Attribute Details

#separatorObject

Returns the value of attribute separator.



32
33
34
# File 'lib/vips/writer.rb', line 32

def separator
  @separator
end

Instance Method Details

#write(path) ⇒ Object



41
42
43
# File 'lib/vips/writer.rb', line 41

def write(path)
  write_gc "#{path}:sep:#{@separator}"
end