Sha256: 080bb4a126a6a7152464501cf3754e2a68cc808404225604b608462d43749a5d

Contents?: true

Size: 940 Bytes

Versions: 10

Compression:

Stored size: 940 Bytes

Contents

module Vedeu

  module Clear

    # Clear the named group.
    #
    # @api private
    class NamedGroup

      class << self

        # @param name [String]
        # @return [void]
        def render(name)
          new(name).render
        end
        alias_method :clear_by_group, :render
        alias_method :by_group, :render

      end # Eigenclass

      # Return a new instance of Vedeu::Clear::NamedGroup.
      #
      # @param name [String]
      # @return [Vedeu::Clear::NamedGroup]
      def initialize(name)
        @name = name
      end

      # @return [void]
      def render
        members.each { |name| Vedeu::Clear::NamedInterface.render(name) }
      end

      protected

      # @!attribute [r] name
      # @return [String]
      attr_reader :name

      private

      # @return [Array<String>]
      def members
        Vedeu.groups.by_name(name).members
      end

    end # Group

  end # Clear

end # Vedeu

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vedeu-0.4.56 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.55 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.54 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.53 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.52 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.51 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.50 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.49 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.48 lib/vedeu/output/clear/named_group.rb
vedeu-0.4.47 lib/vedeu/output/clear/named_group.rb