Parent

Methods

Included Modules

Class/Module Index [+]

Quicksearch

Rabbit::ImageManipulable::Dia

Constants

DIA_COMMANDS

Public Class Methods

match?(filename) click to toggle source
# File lib/rabbit/image/dia.rb, line 18
def match?(filename)
  return true if File.extname(filename).downcase.end_with?(".dia")
  File.open(filename) do |f|
    first_line = f.gets
    second_line = f.gets
    return false unless second_line
    return false unless first_line.start_with?("<?xml")
    return false unless second_line.start_with?("<dia:diagram")
    true
  end
end
new(filename, keep_ratio) click to toggle source
# File lib/rabbit/image/dia.rb, line 38
def initialize(filename, keep_ratio)
  init_svg_loader(filename, keep_ratio)
  super
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.