Class: Vedeu::Geometry::Null
- Inherits:
-
Object
- Object
- Vedeu::Geometry::Null
- Extended by:
- Forwardable
- Defined in:
- lib/vedeu/geometry/null.rb
Overview
Provides a non-existent model to swallow messages.
Instance Attribute Summary collapse
Instance Method Summary collapse
- #area ⇒ Vedeu::Geometry::Area private
- #centred ⇒ FalseClass
-
#initialize(attributes = {}) ⇒ Vedeu::Geometry::Null
constructor
Returns a new instance of Vedeu::Geometry::Null.
- #maximised? ⇒ FalseClass (also: #maximise, #unmaximise)
- #null? ⇒ Boolean
- #store ⇒ Vedeu::Geometry::Null
Constructor Details
#initialize(attributes = {}) ⇒ Vedeu::Geometry::Null
Returns a new instance of Vedeu::Geometry::Null.
40 41 42 43 44 |
# File 'lib/vedeu/geometry/null.rb', line 40 def initialize(attributes = {}) @attributes = attributes @name = @attributes[:name] @maximised = @attributes.fetch(:maximised, false) end |
Instance Attribute Details
#maximised ⇒ Boolean
29 30 31 |
# File 'lib/vedeu/geometry/null.rb', line 29 def maximised @maximised end |
#name ⇒ String|NilClass (readonly)
33 34 35 |
# File 'lib/vedeu/geometry/null.rb', line 33 def name @name end |
Instance Method Details
#area ⇒ Vedeu::Geometry::Area (private)
71 72 73 74 |
# File 'lib/vedeu/geometry/null.rb', line 71 def area @area ||= Vedeu::Geometry::Area.from_attributes(y_default: Vedeu.height, x_default: Vedeu.width) end |
#centred ⇒ FalseClass
47 48 49 |
# File 'lib/vedeu/geometry/null.rb', line 47 def centred false end |
#maximised? ⇒ FalseClass Also known as: maximise, unmaximise
52 53 54 |
# File 'lib/vedeu/geometry/null.rb', line 52 def maximised? false end |
#null? ⇒ Boolean
59 60 61 |
# File 'lib/vedeu/geometry/null.rb', line 59 def null? true end |
#store ⇒ Vedeu::Geometry::Null
64 65 66 |
# File 'lib/vedeu/geometry/null.rb', line 64 def store self end |