Module: NWN::Key

Defined in:
lib/nwn/key.rb

Defined Under Namespace

Classes: Bif, Key

Instance Method Summary collapse

Instance Method Details

#filenamesObject



139
140
141
# File 'lib/nwn/key.rb', line 139

def filenames
  @fn_to_co.indices
end

#get_content_object(filename) ⇒ Object

Get the ContentObject pointing to the given filename. Raises ENOENT if not mapped.

Raises:

  • (Errno::ENOENT)


130
131
132
133
134
135
136
137
# File 'lib/nwn/key.rb', line 130

def get_content_object filename
  filename = filename.downcase
  ret, bif = @fn_to_co[filename]
  raise Errno::ENOENT,
    "No ContentObject with the given filename #{filename.inspect} found." unless
      ret
  ret
end