simpler 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/History +5 -1
  2. data/VERSION +1 -1
  3. data/lib/simpler.rb +7 -15
  4. metadata +2 -2
data/History CHANGED
@@ -1,4 +1,8 @@
1
1
  == 0.0.1 / 2010-07-09
2
2
 
3
- * initial release
3
+ * initial release (as a gem)
4
4
  * supporting array -> vector and dataframe .to_r methods
5
+
6
+ == 0.0.3 / 2010-07-09
7
+
8
+ * eliminate warning
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/simpler.rb CHANGED
@@ -69,20 +69,6 @@ class Simpler
69
69
  Simpler::Reply.new(reply)
70
70
  end
71
71
 
72
- # pushes string onto command array (if given), executes all commands, and
73
- # clears the command array.
74
- def run!(string=nil)
75
- @commands.push(string) if string
76
- reply = nil
77
- Open3.popen3("Rscript -") do |stdin, stdout, stderr|
78
- stdin.puts @commands.map {|v| v + "\n"}.join
79
- stdin.close_write
80
- reply = stdout.read
81
- end
82
- @commands.clear
83
- Simpler::Reply.new(reply)
84
- end
85
-
86
72
  # returns self for chaining
87
73
  def with(*objects, &block)
88
74
  var_names = objects.map {|v| Simpler.varname(v) }
@@ -91,9 +77,15 @@ class Simpler
91
77
  @commands << block.call(*var_names)
92
78
  self
93
79
  end
80
+
81
+ def show_with!(*objects, &block)
82
+ with(*objects, &block).show!
83
+ end
94
84
 
95
- def go(*objects, &block)
85
+ def run_with!(*objects, &block)
96
86
  with(*objects, &block).run!
97
87
  end
98
88
 
89
+ alias_method :go!, :run_with!
90
+
99
91
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Prince