Class: Ambling::Data::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ambling/data.rb

Overview

Build the xml with the class name in lower case

Direct Known Subclasses

BaseData, BaseValueHolder

Instance Method Summary collapse

Instance Method Details

#tag_nameObject



10
11
12
# File 'lib/ambling/data.rb', line 10

def tag_name
  self.class.to_s.split("::").last.downcase
end

#to_xml(builder = nil) ⇒ Object



14
15
16
17
18
# File 'lib/ambling/data.rb', line 14

def to_xml(builder = nil)
  builder ||= Builder::XmlMarkup.new
  builder.tag!(tag_name) { self.build_xml(builder) }
  builder.target!
end