Class: PointsPath

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-doom.rb

Instance Method Summary collapse

Constructor Details

#initialize(points) ⇒ PointsPath

Returns a new instance of PointsPath.



825
826
827
# File 'lib/ruby-doom.rb', line 825

def initialize(points)
  @points = points
end

Instance Method Details

#segment_countObject



828
829
830
# File 'lib/ruby-doom.rb', line 828

def segment_count
  @points.size
end

#startObject



834
835
836
# File 'lib/ruby-doom.rb', line 834

def start  
  @points[0]
end

#visit(visitor) ⇒ Object



831
832
833
# File 'lib/ruby-doom.rb', line 831

def visit(visitor)
  @points.each {|p| visitor.line_to(p) }
end