class CastError < StandardError
end
-# Class using for handling Biopieces the parsing and emitting of Biopiece records,
-# which are ASCII text records consisting of lines with a key/value pair seperated
-# by a colon and a white space ': '. Each record is separated by a line with three
-# dashes '---'.
-#
# Biopieces are command line scripts and uses OptionParser to parse command line
# options according to a list of casts. Each cast prescribes the long and short
# name of the option, the type, if it is mandatory, the default value, and allowed
# and disallowed values. An optional list of extra casts can be supplied, and the
# integrity of the casts are checked. Following the command line parsing, the
-# options are checked according to the casts.
+# options are checked according to the casts. Methods are also included for handling
+# the parsing and emitting of Biopiece records, which are ASCII text records consisting
+# of lines with a key/value pair seperated by a colon and a white space ': '.
+# Each record is separated by a line with three dashes '---'.
class Biopieces
TYPES = %w[flag string list int uint float file file! files files! dir dir! genome]
MANDATORY = %w[long short type mandatory default allowed disallowed]
REGEX_STRING = /^(string|file|file!|dir|dir!|genome)$/
# Initialize a Biopiece and write the status to file.
- def initialize
- status_set
+ def initialize(no_status=nil)
+ status_set unless no_status
end
# Check the integrity of a list of casts, followed by parsion options from argv