class Yzz::PoswardSide
Separate class for posward sides of zz objects.
Public Instance Methods
direction()
click to toggle source
The direction of a PoswardSide
is always :posward.
# File lib/yzz/posward_side.rb, line 8 def direction; :posward end
label()
click to toggle source
Returns the “side label” string.
# File lib/yzz/posward_side.rb, line 32 def label "#{dimension}->" end
opposite_direction()
click to toggle source
Opposite direction of a PoswardSide
is always :negward.
# File lib/yzz/posward_side.rb, line 12 def opposite_direction; :posward end
opposite_side( of: zz )
click to toggle source
Given a Yzz
object, returns its negward side along the dimension same as the receiver's dimension. If no object is given, negward side opposite to the receiver is returned.
# File lib/yzz/posward_side.rb, line 26 def opposite_side( of: zz ) of.along( dimension ).negward end
same_side( of: zz )
click to toggle source
Given a Yzz
object, returns its posward side along the dimension same as the receiver's dimension. If no object is given, the method simply returns the receiver.
# File lib/yzz/posward_side.rb, line 18 def same_side( of: zz ) of.along( dimension ).posward end
to_s()
click to toggle source
Returns the string briefly describing the instance.
# File lib/yzz/posward_side.rb, line 38 def to_s "#<Yzz::PoswardSide of #{zz} along #{dimension}>" end