Module: Restiny::SocketPlugSource

Defined in:
lib/restiny/constants.rb

Overview

The source location of a socket plug.

Constant Summary collapse

NONE =
0
INVENTORY_SOURCED =
1
REUSABLE_PLUG_ITEMS =
2
PROFILE_PLUG_SET =
4
CHARACTER_PLUG_SET =
8

Class Method Summary collapse

Class Method Details

.sources_for_value(value) ⇒ Object



384
385
386
387
388
389
390
391
# File 'lib/restiny/constants.rb', line 384

def self.sources_for_value(value)
  [].tap do |sources|
    constants.each do |source|
      source_value = const_get(source)
      sources << source_value if (value & source_value) != 0
    end
  end
end