Class: DotGrid::Pattern::HorizontalRule

Inherits:
Pattern
  • Object
show all
Defined in:
lib/dot_grid/pattern/horizontal_rule.rb

Instance Attribute Summary

Attributes inherited from Pattern

#bounds, #grid_color, #pdf

Instance Method Summary collapse

Methods inherited from Pattern

#columns, #draw_grid, #initialize, #post_initialize, #rows

Constructor Details

This class inherits a constructor from DotGrid::Pattern::Pattern

Instance Method Details

#drawObject



4
5
6
7
8
9
# File 'lib/dot_grid/pattern/horizontal_rule.rb', line 4

def draw
  pdf.stroke_color grid_color
  draw_grid do |row, column|
    pdf.stroke_horizontal_line(0, bounds.width, :at => row*spacing) if column == 0
  end
end