Module: OsCtld::Assets

Defined in:
lib/osctld/assets.rb

Defined Under Namespace

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

Class Method Summary collapse

Class Method Details

.for_type(t) ⇒ Object



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

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
# File 'lib/osctld/assets.rb', line 8

def self.types
  return [] unless @types
  @types.keys
end