Class: PointsPath
- Inherits:
-
Object
- Object
- PointsPath
- Defined in:
- lib/ruby-doom.rb
Instance Method Summary collapse
-
#initialize(points) ⇒ PointsPath
constructor
A new instance of PointsPath.
- #segment_count ⇒ Object
- #start ⇒ Object
- #visit(visitor) ⇒ Object
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_count ⇒ Object
828 829 830 |
# File 'lib/ruby-doom.rb', line 828 def segment_count @points.size end |
#start ⇒ Object
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 |