Class: Sevgi::Sundries::Grid::Axis

Inherits:
Ruler show all
Defined in:
lib/sevgi/sundries/grid.rb

Overview

Axis wrapper exposing grid line queries for one ruler direction.

Direct Known Subclasses

X, Y

Defined Under Namespace

Classes: Halve, Major, Minor, Query

Instance Attribute Summary collapse

Attributes inherited from Ruler

#brut, #sub

Attributes inherited from Interval

#n, #u

Instance Method Summary collapse

Methods inherited from Ruler

#expand, #margin, #ms, #sd, #sn, #su, #waste

Methods inherited from Interval

[], #[], #count, #d, #ds, #h, #hs, #nds, #nhs

Constructor Details

#initialize(this, other) ⇒ void

Creates an axis wrapper.

Parameters:



71
72
73
74
75
76
77
# File 'lib/sevgi/sundries/grid.rb', line 71

def initialize(this, other)
  super(this)

  @major = Major.new(self, other)
  @halve = Halve.new(self, other)
  @minor = Minor.new(self, other)
end

Instance Attribute Details

#halveSevgi::Sundries::Grid::Axis::Halve (readonly)

Returns the midpoint line query.



61
62
63
# File 'lib/sevgi/sundries/grid.rb', line 61

def halve
  @halve
end

#majorSevgi::Sundries::Grid::Axis::Major (readonly)

Returns the major line query.



57
58
59
# File 'lib/sevgi/sundries/grid.rb', line 57

def major
  @major
end

#minorSevgi::Sundries::Grid::Axis::Minor (readonly)

Returns the minor line query.



65
66
67
# File 'lib/sevgi/sundries/grid.rb', line 65

def minor
  @minor
end