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)


48
49
50
51
52
# File 'lib/vedeu/geometry/null.rb', line 48

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

Instance Attribute Details

#maximisedBoolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/vedeu/geometry/null.rb', line 37

def maximised
  @maximised
end

#nameNilClass|String|Symbol (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:

  • (NilClass|String|Symbol)


41
42
43
# File 'lib/vedeu/geometry/null.rb', line 41

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.



57
58
59
60
# File 'lib/vedeu/geometry/null.rb', line 57

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