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:



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

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.



63
64
65
# File 'lib/sevgi/sundries/grid.rb', line 63

def halve
  @halve
end

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

Returns the major line query.



59
60
61
# File 'lib/sevgi/sundries/grid.rb', line 59

def major
  @major
end

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

Returns the minor line query.



67
68
69
# File 'lib/sevgi/sundries/grid.rb', line 67

def minor
  @minor
end