rp 0.0.3 → 0.0.4

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/Gemfile +0 -2
  2. data/lib/rp.rb +6 -3
  3. data/lib/rp/version.rb +1 -1
  4. metadata +1 -1
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in rp.gemspec
4
4
  gemspec
5
-
6
- gem 'rhtml'
data/lib/rp.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  require "rp/version"
2
- require "Rhtml"
2
+ require "rhtml"
3
3
 
4
4
  module Rp
5
+ include Rhtml
5
6
  extend self
6
7
 
7
8
  INDENT_SIZE = 2
@@ -12,7 +13,7 @@ module Rp
12
13
  end
13
14
 
14
15
  def ends s, n=0
15
- n.times {|i| @doc << "\n" << INDENT*(s-i) << "end"} if s > 0
16
+ n.times {|i| @doc << "\n" << INDENT*(s-i) << "end"} if s >= 0
16
17
  end
17
18
 
18
19
  def parse(lines)
@@ -37,7 +38,9 @@ module Rp
37
38
  end
38
39
  end
39
40
 
40
- ends(@indent - 1, @indent)
41
+ ends(@indent-1, @indent)
41
42
  eval(@doc)
43
+
42
44
  end
43
45
  end
46
+ print Rp.parse(open(File.expand_path("../tmp/test.r")).readlines)
@@ -1,3 +1,3 @@
1
1
  module Rp
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rp
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: