Class: ProconBypassMan::Procon::MacroPluginMap

Inherits:
Hash
  • Object
show all
Defined in:
lib/procon_bypass_man/procon/macro_plugin_map.rb

Overview

macroキーにメタデータを埋め込んでいる. 通常の処理ではメタデータを露出したくないので露出しないためのクラス

Instance Method Summary collapse

Instance Method Details

#[](value) ⇒ Object



5
6
7
# File 'lib/procon_bypass_man/procon/macro_plugin_map.rb', line 5

def [](value)
  self.fetch([value, :normal], nil)
end

#eachObject



9
10
11
# File 'lib/procon_bypass_man/procon/macro_plugin_map.rb', line 9

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

#keysObject



14
15
16
# File 'lib/procon_bypass_man/procon/macro_plugin_map.rb', line 14

def keys
  super.map(&:first)
end

#original_keysObject



13
# File 'lib/procon_bypass_man/procon/macro_plugin_map.rb', line 13

alias_method :original_keys, :keys

#raw_keysObject



18
19
20
# File 'lib/procon_bypass_man/procon/macro_plugin_map.rb', line 18

def raw_keys
  self.original_keys
end