rhtml 0.0.5 → 0.0.6

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/rhtml/html.rb +6 -8
  2. data/lib/rhtml/version.rb +1 -1
  3. metadata +1 -1
@@ -1,7 +1,5 @@
1
1
  module Rhtml
2
2
  class Html
3
- attr_accessor :content, :indent
4
-
5
3
  def initialize(content='', indent=0, &b)
6
4
  @indent = 0
7
5
  @content = content
@@ -10,21 +8,21 @@ module Rhtml
10
8
 
11
9
  def tag!(tag_name, ps={}, str=nil, &b)
12
10
  str, ps = ps, {} if ps.is_a? String
13
- content << Rhtml.tag_open(tag_name, ps, indent)
11
+ @content << Rhtml.tag_open(tag_name, ps, @indent)
14
12
  @indent += 1
15
13
  if str
16
- content << INDENT * indent << str << "\n"
14
+ @content << INDENT * @indent << str << "\n"
17
15
  elsif block_given?
18
16
  ret = instance_eval &b
19
- content << INDENT * indent << ret.to_s << "\n" if ret.is_a?(String)
17
+ @content << INDENT * @indent << ret.to_s << "\n" if ret.is_a?(String)
20
18
  end
21
19
  @indent -= 1
22
- self.content << Rhtml.tag_close(tag_name, indent)
20
+ @content << Rhtml.tag_close(tag_name, @indent)
23
21
  self
24
22
  end
25
23
 
26
24
  def void_tag!(tag_name, ps={})
27
- content << Rhtml.void_tag(tag_name, ps, indent)
25
+ @content << Rhtml.void_tag(tag_name, ps, @indent)
28
26
  self
29
27
  end
30
28
 
@@ -45,7 +43,7 @@ module Rhtml
45
43
  end
46
44
 
47
45
  def to_s
48
- content
46
+ @content
49
47
  end
50
48
  end
51
49
  end
@@ -1,3 +1,3 @@
1
1
  module Rhtml
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhtml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: