Sha256: 3640e3aa6e5e6b0b6837fce3b8bd5fb32cc5d5ce09a1a8672fbb4b3ba5f14b18

Contents?: true

Size: 930 Bytes

Versions: 3

Compression:

Stored size: 930 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Interfaces

    # Allows the storing of interfaces and views.
    #
    class Repository < Vedeu::Repositories::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

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.8.23 lib/vedeu/interfaces/repository.rb
vedeu-0.8.22 lib/vedeu/interfaces/repository.rb
vedeu-0.8.21 lib/vedeu/interfaces/repository.rb