Class: Vedeu::Geometry::Null Private

Inherits:
Null::Generic show all
Extended by:
Forwardable
Defined in:
lib/vedeu/geometry/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 model to swallow messages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Vedeu::Geometry::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::Geometry::Null.

Parameters:

  • attributes (Hash<Symbol => void>) (defaults to: {})

Options Hash (attributes):

  • name (String|Symbol|NilClass)


42
43
44
45
46
# File 'lib/vedeu/geometry/null.rb', line 42

def initialize(attributes = {})
  @attributes = attributes
  @name       = @attributes[:name]
  @maximised  = @attributes.fetch(:maximised, false)
end

Instance Attribute Details

#maximisedBoolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/vedeu/geometry/null.rb', line 31

def maximised
  @maximised
end

#nameString|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.

Returns:

  • (String|NilClass)


35
36
37
# File 'lib/vedeu/geometry/null.rb', line 35

def name
  @name
end

Instance Method Details

#areaVedeu::Geometry::Area (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.



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

def area
  @area ||= Vedeu::Geometry::Area.from_attributes(y_default: Vedeu.height,
                                                  x_default: Vedeu.width)
end