lib/configstruct.rb in configstruct-0.0.2 vs lib/configstruct.rb in configstruct-0.0.3

- old
+ new

@@ -3,10 +3,12 @@ class ConfigStruct < OpenStruct def initialize(options = nil, input = STDIN, output = STDOUT) super(options) + @input = input + @output = output set_defaults prepare_dirs addvalues end @@ -37,8 +39,24 @@ def write(values) File.open(self.basefile, 'w') do |f| f.write YAML.dump(values) end + end + + def puts(*string) + @output.puts *string + end + + def print(*string) + @output.print *string + end + + def printf(string, *args) + @output.printf string, *args + end + + def gets(*args) + @input.gets *args end end