kind_dom 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/kind_dom/base.rb +7 -6
  2. metadata +1 -1
data/lib/kind_dom/base.rb CHANGED
@@ -12,20 +12,21 @@ module KindDom
12
12
  # The original libxml behavior of the parsed document is preserved.
13
13
  #
14
14
  # As a contrived example, in the controller:
15
- # @results = KindDom.new(xml_data)
15
+ # @results = KindDom::Base.new(xml_data)
16
16
  #
17
17
  # In the view:
18
18
  #
19
19
  # <% @results.first_of('//item') do |item| -%>
20
20
  # <p>(This block is only executed if `item` is found.)</p>
21
21
  #
22
- # <% item.content_for('title') do |title| -%>
23
- # <h2><%=h title %></h2>
24
- # <p>(This block is only executed if `title` has content.)</p>
22
+ # <% item.content_for('title', '(Untitled)') do |content| -%>
23
+ # <h2><%=h content %></h2>
24
+ # <p>(This header will show "(Untitled)" if `title` is blank or not found.)</p>
25
25
  # <% end -%>
26
26
  #
27
- # <% item.content_for('description') do |description| -%>
28
- # <p><%=h description %></p>
27
+ # <% item.content_for('description') do |content| -%>
28
+ # <p><%= item.content_for('@updated_at') {|date| "<em>#{date}</em> -- " } %>
29
+ # <%=h content %></p>
29
30
  # <p>(This block is only executed if `description` has content.)</p>
30
31
  # <% end -%>
31
32
  # <% end -%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kind_dom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mars Hall