Sha256: e3650f179cf538f53d34f8cabd48bfa173a1305facb4c90a6ee27b56413fad6c

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

Stored size: 595 Bytes

Contents

require 'mork'

class SampleImager
  attr_reader :info, :reg_marks, :q_boxes, :code_string, :code_int
  
  def initialize(which)
    ya = YAML.load_file("./spec/samples/info.yml")
    @info        = ya[which.to_s]
    @reg_marks   = @info["reg_marks"]
    @q_boxes     = @info["q_boxes"]
    @code_string = @info["code_string"]
    @code_int    = @info["code_int"]
  end
  
  def filename
    @info["filename"]
  end
  
  def width
    @info["width"]
  end
  
  def height
    @info["height"]
  end
  
  def pages
    @info["pages"]
  end
end

def sample_img(which)
  SampleImager.new(which)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mork-0.0.5 spec/spec_helper.rb
mork-0.0.3 spec/spec_helper.rb
mork-0.0.2 spec/spec_helper.rb