Sha256: 2fac73ac30042e378ba57d6fd1d781b43d43de2e59bbf0d9dedbf03abb670470

Contents?: true

Size: 999 Bytes

Versions: 5

Compression:

Stored size: 999 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Interfaces

    # Allows the storing of interfaces and views.
    #
    class Repository < Vedeu::Repositories::Repository

      singleton_class.send(:alias_method, :interfaces, :repository)

      null Vedeu::Interfaces::Null
      real Vedeu::Interfaces::Interface

      # Returns the interface names in zindex order.
      #
      # @example
      #   Vedeu.interfaces.zindexed
      #
      # @return [Array<String|Symbol>]
      # @see Vedeu::Interfaces::DSL#zindex
      def zindexed
        all.sort_by(&:zindex).map(&:name)
      end

    end # Interfaces

    class Interface

      repo Vedeu::Interfaces::Repository.repository

    end # Interface

  end # Interfaces

  # Manipulate the repository of interfaces.
  #
  # @example
  #   Vedeu.interfaces
  #
  # @api public
  # @!method interfaces
  # @return [Vedeu::Interfaces::Repository]
  def_delegators Vedeu::Interfaces::Repository,
                 :interfaces

end # Vedeu

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vedeu-0.8.20 lib/vedeu/interfaces/repository.rb
vedeu-0.8.19 lib/vedeu/interfaces/repository.rb
vedeu-0.8.18 lib/vedeu/interfaces/repository.rb
vedeu-0.8.17 lib/vedeu/interfaces/repository.rb
vedeu-0.8.16 lib/vedeu/interfaces/repository.rb