scrolls 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/scrolls/version.rb +1 -1
  2. data/lib/scrolls.rb +6 -3
  3. metadata +1 -1
@@ -1,3 +1,3 @@
1
1
  module Scrolls
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/scrolls.rb CHANGED
@@ -16,8 +16,11 @@ module Scrolls
16
16
  module Log
17
17
  extend self
18
18
 
19
- def start
20
- $stdout.sync = $stderr.sync = true
19
+ attr_accessor :stream
20
+
21
+ def start(stream = STDOUT)
22
+ @stream = stream
23
+ @stream.sync = true
21
24
  log(:log => true, :start => true)
22
25
  end
23
26
 
@@ -28,7 +31,7 @@ module Scrolls
28
31
  def write(data)
29
32
  msg = unparse(data)
30
33
  mtx.synchronize do
31
- $stdout.puts(msg)
34
+ stream.puts(msg)
32
35
  end
33
36
  end
34
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrolls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: