Module: NanDoc::Helpers::NanDocHelpers::SiteMap::Glyphs Private

Included in:
NanDoc::Helpers::NanDocHelpers::SiteMap
Defined in:
lib/nandoc/helpers/site-map.rb,
lib/nandoc/helpers/site-map.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

forward declaration

Constant Summary collapse

Blank =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

www.alanwood.net/unicode/box_drawing.html

' '
DownLf =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'┐'
DownRt =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'┌'
HvVtLf =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'┫'
HvVert =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'┃'
UpLeft =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'┘'
UpRite =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'└'
Vertic =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'│'
VertLf =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'┤'
VertRt =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'├'
VtHori =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'┼'
ArcUpL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'╯'
DashQV =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

' ┊'
UseThisForBlanks =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

proc{|node| DashQV }

Instance Method Summary collapse

Instance Method Details

#glyphs_rightObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



148
149
150
151
152
153
154
155
156
157
158
# File 'lib/nandoc/helpers/site-map.rb', line 148

def glyphs_right
  case level
  when 0; fail('never')
  when 1; ''
  else
    these = [ is_last ? ArcUpL : HvVtLf ]
    these.concat( parent.glyphs_right_for_child ) if parent
    # these.concat Array.new([0, level-1].max, DashQV)
    these.join('')
  end
end

#glyphs_right_for_childObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

DashQV is nice b/c fixed width



135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/nandoc/helpers/site-map.rb', line 135

def glyphs_right_for_child
  @glyphs_right_for_child ||= begin
    case level
    when 0; []     # e.g. the object that is rendering [home]
    when 1; []     # e.g. home, the (lvl2) children have no inheirited
    else
      x = [ is_last ? UseThisForBlanks.call(self) : HvVert ]
      x.concat(parent.glyphs_right_for_child) if parent
      x
    end
  end
end