lib/yzz.rb in yzz-2.0.1 vs lib/yzz.rb in yzz-2.0.2
- old
+ new
@@ -1,6 +1,7 @@
-# -*- coding: utf-8 -*-
+# encoding: utf-8
+
require_relative 'yzz/version'
require_relative 'yzz/side'
require_relative 'yzz/side_pair'
# Yzz implements Ted Nelson's zz (hyperorthogonal, Zig-Zag...) structure. It
@@ -17,11 +18,11 @@
#
# To these basic properties, Ted Nelson adds a bunch of other terminology.
# A rank is a series of zz objects connected along one dimension. A rank viewed
# horizontally is referred to as row. A rank viewed vertically is referred to
# as column.
-
+#
# Mixin defining Zz structure (aka. hyperorthogonal structure). As represented
# by YTed::Zz, a Zz structure is a collection of objects, whose connectivity is
# defined in a multidimensional space in such way, that each object, along each
# dimension, has at most one posward neighbor, and one negward neighbor. The
# relation is bijective: If B is a posward neighbor of A along some dimension,
@@ -52,10 +53,12 @@
end
alias connectivity connections
# Returns all neighbors of a zz object.
#
- def neighbors; connections.map &:neighbor end
+ def neighbors
+ connections.map &:neighbor
+ end
# Returns all sides facing another zz object supplied as argument. (Note that
# this can be <em>more than 1</em> side: object A can be connected to B along
# more than 1 dimension.
#