Class: Vedeu::Geometry::Null
- Inherits:
-
Null::Generic
- Object
- Null::Generic
- 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
-
#initialize(attributes = {}) ⇒ Vedeu::Geometry::Null
constructor
Returns a new instance of 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)
49 50 51 52 |
# File 'lib/vedeu/geometry/null.rb', line 49 def area @area ||= Vedeu::Geometry::Area.from_attributes(y_default: Vedeu.height, x_default: Vedeu.width) end |