Class: Sevgi::Sundries::Grid::Axis
- Defined in:
- lib/sevgi/sundries/grid.rb
Overview
Axis wrapper exposing grid line queries for one line direction.
Defined Under Namespace
Classes: Halve, Major, Minor, Query
Instance Attribute Summary collapse
-
#halve ⇒ Sevgi::Sundries::Grid::Axis::Halve
readonly
Returns lines placed at the perpendicular ruler's halfway distances.
-
#major ⇒ Sevgi::Sundries::Grid::Axis::Major
readonly
Returns lines placed at the perpendicular ruler's major distances.
-
#minor ⇒ Sevgi::Sundries::Grid::Axis::Minor
readonly
Returns lines placed at the perpendicular ruler's minor distances.
Attributes inherited from Ruler
Attributes inherited from Interval
Instance Method Summary collapse
-
#initialize(this, other) ⇒ void
constructor
private
Creates an axis wrapper.
Methods inherited from Ruler
#expand, #margins, #ms, #sd, #sn, #su, #waste
Methods inherited from Interval
[], #[], #count, #d, #ds, #h, #hs, #nds, #nhs
Constructor Details
#initialize(this, other) ⇒ void
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.
Creates an axis wrapper.
125 126 127 128 129 130 131 |
# File 'lib/sevgi/sundries/grid.rb', line 125 def initialize(this, other) super(this) @major = Major.send(:new, self, other) @halve = Halve.send(:new, self, other) @minor = Minor.send(:new, self, other) end |
Instance Attribute Details
#halve ⇒ Sevgi::Sundries::Grid::Axis::Halve (readonly)
Returns lines placed at the perpendicular ruler's halfway distances.
114 115 116 |
# File 'lib/sevgi/sundries/grid.rb', line 114 def halve @halve end |
#major ⇒ Sevgi::Sundries::Grid::Axis::Major (readonly)
Returns lines placed at the perpendicular ruler's major distances.
110 111 112 |
# File 'lib/sevgi/sundries/grid.rb', line 110 def major @major end |
#minor ⇒ Sevgi::Sundries::Grid::Axis::Minor (readonly)
Returns lines placed at the perpendicular ruler's minor distances.
118 119 120 |
# File 'lib/sevgi/sundries/grid.rb', line 118 def minor @minor end |