Class: Corridor
Overview
Represents a corridor, given its starting point, its ending point and its width
Instance Attribute Summary collapse
-
#end_point ⇒ Object
readonly
Returns the value of attribute end_point.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#start_point ⇒ Object
readonly
Returns the value of attribute start_point.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(name, startpt, endpt, width) ⇒ Corridor
constructor
A new instance of Corridor.
Methods included from SITACObjects
Constructor Details
#initialize(name, startpt, endpt, width) ⇒ Corridor
Returns a new instance of Corridor.
163 164 165 166 167 168 169 |
# File 'lib/sitac_objects.rb', line 163 def initialize(name, startpt, endpt, width) super @name = name @start_point = as_point(startpt) @end_point = as_point(endpt) @width = width end |
Instance Attribute Details
#end_point ⇒ Object (readonly)
Returns the value of attribute end_point.
157 158 159 |
# File 'lib/sitac_objects.rb', line 157 def end_point @end_point end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
157 158 159 |
# File 'lib/sitac_objects.rb', line 157 def name @name end |
#start_point ⇒ Object (readonly)
Returns the value of attribute start_point.
157 158 159 |
# File 'lib/sitac_objects.rb', line 157 def start_point @start_point end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
157 158 159 |
# File 'lib/sitac_objects.rb', line 157 def width @width end |
Instance Method Details
#accept(visitor) ⇒ Object
171 172 173 |
# File 'lib/sitac_objects.rb', line 171 def accept(visitor) visitor.visit_corridor self end |