G
Glen Holcomb
So I'm getting an unexpected IOError in my code.
class ConfigStub < File
def initialize(location)
unless filename =3D location.gsub("/", "_")
raise ArgumentError, INVALID_LOCATION_FORMAT
end
@stub =3D File.open(CONFIG_PATH + filename, "w+") # This might need=
to
be more sophisticated depending on the rule
end # initialize
end # ConfigStub class
class Directive
def initialize(location)
@sanity_checker =3D SanityChecker.new()
@config_stub =3D ConfigStub.new(location)
@directive =3D ["<Location #{location}>"]
@config_stub.each do |line|
@directive << line
end
end # initialize
class ConfigStub < File
def initialize(location)
unless filename =3D location.gsub("/", "_")
raise ArgumentError, INVALID_LOCATION_FORMAT
end
@stub =3D File.open(CONFIG_PATH + filename, "w+") # This might need=
to
be more sophisticated depending on the rule
end # initialize
end # ConfigStub class
class Directive
def initialize(location)
@sanity_checker =3D SanityChecker.new()
@config_stub =3D ConfigStub.new(location)
@directive =3D ["<Location #{location}>"]
@config_stub.each do |line|
@directive << line
end
end # initialize