Class: VisiLibity::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/visilibity.rb

Instance Method Summary collapse

Instance Method Details

#[](x) ⇒ Object



111
112
113
# File 'lib/visilibity.rb', line 111

def [](x)
  index(x)
end

#each_holeObject



103
104
105
# File 'lib/visilibity.rb', line 103

def each_hole
  (0..h-1).each{|i| yield self.index(i+1)}
end

#holesObject



107
108
109
# File 'lib/visilibity.rb', line 107

def holes
  Enumerable::Enumerator.new(self, :each_hole).to_a
end

#outer_boundaryObject



99
100
101
# File 'lib/visilibity.rb', line 99

def outer_boundary
  self[0]
end