Module: OsCtld::Assets

Defined in:
lib/osctld/assets.rb

Defined Under Namespace

Modules: Definition Classes: Base, BaseFile, CgroupDeviceList, CgroupProgram, Dataset, Directory, Entry, File, Symlink, UnixSocket, Validator

Class Method Summary collapse

Class Method Details

.for_type(t) ⇒ Object



14
15
16
17
18
# File 'lib/osctld/assets.rb', line 14

def self.for_type(t)
  return unless @types

  @types[t]
end

.register(type, klass) ⇒ Object



3
4
5
6
# File 'lib/osctld/assets.rb', line 3

def self.register(type, klass)
  @types ||= {}
  @types[type] = klass
end

.typesObject



8
9
10
11
12
# File 'lib/osctld/assets.rb', line 8

def self.types
  return [] unless @types

  @types.keys
end