Module: NWN::Key
- Defined in:
- lib/nwn/key.rb
Defined Under Namespace
Instance Method Summary collapse
- #filenames ⇒ Object
-
#get_content_object(filename) ⇒ Object
Get the ContentObject pointing to the given filename.
Instance Method Details
#filenames ⇒ Object
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.
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 |