class RQRCodeSVG::Sequence

Public Class Methods

new(qr_code) click to toggle source
# File lib/rqrcode_svg/sequence.rb, line 3
def initialize(qr_code)
  @qr_code = qr_code
end

Public Instance Methods

dark_squares_only() { |row, column| ... } click to toggle source

This method yields the vertices of the dark squares

# File lib/rqrcode_svg/sequence.rb, line 8
def dark_squares_only(&block)
  @qr_code.modules.each_index do |row|
    @qr_code.modules.each_index do |column|
      if @qr_code.dark?(row, column)
        yield row, column
      end
    end
  end
end