WAD::Pnames
Inherits WritingAdditions::Pnames < Reference < Object
Includes all the names for wall patches.
Constructors
parse(filename : String | Path) : Pnames
Parses a pnames file given the filename
Example: Opens a pnames file and parses it
my_pnames = WAD::Pnames.parse("Path/To/Pnames")
parse(io : IO) : Pnames
Parses a pnames file given the io
Example: Opens a pnames io and parses it
File.open("Path/To/Pnames") do |file|
my_pnames = WAD::Pnames.parse(file)
end
Class methods
is_pnames?(name : String)
Checks to see if name is "PNAMES"
Example: Returns true if the name is a pnames
pnames_name = "PNAMES"
if WAD::Pnames.is_pnames?(pnames_name)
puts "Is a Pnames"
else
puts "Is not a Pnames"
end
Instance methods
clone
Returns a copy of self with all instance variables cloned.
num_patches
num_patches=(num_patches : Int32)
patches
patches=(patches : Array(String))