Class: Vedeu::Geometry::Null

Inherits:
Null::Generic show all
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

Constructor Details

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

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

Parameters:

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

Options Hash (attributes):

  • name (String|Symbol|NilClass)


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

#maximisedBoolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/vedeu/geometry/null.rb', line 29

def maximised
  @maximised
end

#nameString|NilClass (readonly)

Returns:

  • (String|NilClass)


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

def name
  @name
end

Instance Method Details

#areaVedeu::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