Remarkably 0.3.0 → 0.4.0

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/remarkably.rb +5 -3
  2. metadata +2 -2
data/lib/remarkably.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Remarkably
2
2
  def method_missing(sym, *args, &block)
3
3
  hash = args.last.is_a?(Hash) ? args.pop : {}
4
- tag!(sym.to_s.downcase, args, hash, &block)
4
+ tag!(sym, args, hash, &block)
5
5
  end
6
6
 
7
7
  def tag_xml!( tag, inline, attributes, &block )
@@ -60,7 +60,9 @@ module Remarkably
60
60
  end
61
61
  end
62
62
 
63
- def tag!(tag, inline, attributes, &block)
63
+ def tag!(tag, inline=[], attributes={}, &block)
64
+ tag = tag.to_s.downcase
65
+ inline = [inline] if inline.class != Array
64
66
  @remarkably ||= ''
65
67
  @remarkably_method ||= :xml
66
68
 
@@ -79,7 +81,7 @@ module Remarkably
79
81
  self
80
82
  end
81
83
 
82
- def remarkably
84
+ def to_s
83
85
  result = @remarkably
84
86
  @remarkably = nil
85
87
  result
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: Remarkably
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.0
7
- date: 2007-05-15 00:00:00 +02:00
6
+ version: 0.4.0
7
+ date: 2007-05-16 00:00:00 +02:00
8
8
  summary: Remarkably is a very tiny Markaby-like XML builder
9
9
  require_paths:
10
10
  - lib