Sha256: a90f64a3c63e617ce1257b4a2fa6ffca9914efa6af304efde3ff6872692e93ce

Contents?: true

Size: 563 Bytes

Versions: 21

Compression:

Stored size: 563 Bytes

Contents

module ProconBypassMan
  class Procon
    # macroキーにメタデータを埋め込んでいる. 通常の処理ではメタデータを露出したくないので露出しないためのクラス
    class MacroPluginMap < ::Hash
      def [](value)
        self.fetch([value, :normal], nil)
      end

      def each
        transform_keys(&:first).each { |x| yield(x[0], x[1]) }
      end

      alias_method :original_keys, :keys
      def keys
        super.map(&:first)
      end

      def raw_keys
        self.original_keys
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.11 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.2.2 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.2.1 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.2.0 lib/procon_bypass_man/procon/macro_plugin_map.rb
procon_bypass_man-0.1.23 lib/procon_bypass_man/procon/macro_plugin_map.rb