Class: Vedeu::Borders::Null Private

Inherits:
Object
  • Object
show all
Defined in:
lib/vedeu/borders/null.rb

Overview

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

Provides a non-existent Vedeu::Borders::Border that acts like the real thing, but does nothing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Vedeu::Borders::Null

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.

Returns a new instance of Vedeu::Borders::Null.

Options Hash (attributes):

  • name (String|Symbol|NilClass)


21
22
23
24
# File 'lib/vedeu/borders/null.rb', line 21

def initialize(attributes = {})
  @attributes = attributes
  @name       = @attributes[:name]
end

Instance Attribute Details

#nameString|Symbol|NilClass (readonly)

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.



14
15
16
# File 'lib/vedeu/borders/null.rb', line 14

def name
  @name
end

Instance Method Details

#bxFixnum Also known as: x

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.



27
28
29
# File 'lib/vedeu/borders/null.rb', line 27

def bx
  geometry.x
end

#bxnFixnum Also known as: xn

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.



33
34
35
# File 'lib/vedeu/borders/null.rb', line 33

def bxn
  geometry.xn
end

#byFixnum Also known as: y

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.



39
40
41
# File 'lib/vedeu/borders/null.rb', line 39

def by
  geometry.y
end

#bynFixnum Also known as: yn

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.



45
46
47
# File 'lib/vedeu/borders/null.rb', line 45

def byn
  geometry.yn
end

#enabled?Boolean

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.



51
52
53
# File 'lib/vedeu/borders/null.rb', line 51

def enabled?
  false
end

#geometryObject (private)

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.

Returns the geometry for the interface.



75
76
77
# File 'lib/vedeu/borders/null.rb', line 75

def geometry
  @geometry ||= Vedeu.geometries.by_name(name)
end

#heightFixnum

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.



56
57
58
# File 'lib/vedeu/borders/null.rb', line 56

def height
  (by..byn).size
end

#renderArray

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.



61
62
63
# File 'lib/vedeu/borders/null.rb', line 61

def render
  []
end

#widthFixnum

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.



66
67
68
# File 'lib/vedeu/borders/null.rb', line 66

def width
  (bx..bxn).size
end