Class Ambling::Data::BaseValue
In: lib/ambling/data.rb
Parent: Object

A data point in the XML has a value and attributes

Methods

build_xml   new   tag_name   to_xml  

Attributes

attributes  [RW] 
value  [RW] 

Public Class methods

[Source]

# File lib/ambling/data.rb, line 25
      def initialize(value, attributes={})
        @value = value
        @attributes = attributes
      end

Public Instance methods

[Source]

# File lib/ambling/data.rb, line 40
      def build_xml(builder)
        builder.tag!(tag_name, @value, @attributes)
      end

[Source]

# File lib/ambling/data.rb, line 36
      def tag_name
        "value"
      end

[Source]

# File lib/ambling/data.rb, line 30
      def to_xml
        builder = Builder::XmlMarkup.new
        build_xml(builder)
        builder.target!
      end

[Validate]