Sha256: c19415db4ccc0f30488031784ece83dc74422b16fcad7dff22ec9c99d06b25b4

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 Bytes

Contents

module Vedeu

  # Allows the storing of interface/view geometry independent of the interface
  # instance.
  #
  class Geometries < Repository

    # @return [Vedeu::Geometries]
    def self.geometries
      @geometries ||= reset!
    end

    # @return [Vedeu::Geometries]
    def self.repository
      Vedeu.geometries
    end

    # @return [Vedeu::Geometries]
    def self.reset!
      @geometries = Vedeu::Geometries.new(Vedeu::Geometry)
    end

    # @param name [String] The name of the stored geometry.
    # @return [Vedeu::Geometry|Vedeu::NullGeometry]
    def by_name(name)
      if registered?(name)
        find(name)

      else
        Vedeu::NullGeometry.new

      end
    end

  end # Geometries

end # Vedeu

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.4.14 lib/vedeu/repositories/repositories/geometries.rb