Sha256: c524b4751368e8cc213ae8bb31016bc817704ccbdfab385b808f265c837161d1

Contents?: true

Size: 560 Bytes

Versions: 3

Compression:

Stored size: 560 Bytes

Contents

module Docks
  module Types
    module Access
      PUBLIC      = "public"
      PRIVATE     = "private"
    end
  end

  module Tags
    class Access < Base
      def initialize
        @name = :access
        @multiline = false

        @access_types = Docks::Types::Access.constants.map do |const|
          Docks::Types::Access.const_get(const)
        end
      end

      def process(symbol)
        symbol.update(@name) do |access|
          @access_types.include?(access) ? access : Docks::Types::Access::PUBLIC
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
docks_app-0.0.3 lib/docks/tags/access_tag.rb
docks_app-0.0.2 lib/docks/tags/access_tag.rb
docks_app-0.0.1 lib/docks/tags/access_tag.rb