Class: Gorp::Commands::XmlMarkup

Inherits:
Builder::XmlMarkup
  • Object
show all
Defined in:
lib/gorp/commands.rb

Instance Method Summary collapse

Instance Method Details

#tag!(sym, *args, &block) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/gorp/commands.rb', line 29

def tag!(sym, *args, &block)
  sym = "#{sym}:#{args.shift}" if args.first.kind_of?(::Symbol)
  if not block and args.first == ''
    attrs = {}
    attrs.merge!(args.last) if ::Hash === args.last
    _indent
    _start_tag(sym, attrs)
    _end_tag(sym)
    _newline
  else
    super
  end
end