class Hermod::XmlSectionBuilder
def integer_node(name, options={})
options - a hash of options used to set up validations.
name - the name of the node. This will become the name of the method on the XmlSection.
Public: defines a node for sending an integer to HMRC
def integer_node(name, options={}) validators = [].tap do |validators| if options.has_key? :range validators << Validators::Range.new(options[:range][:min], options[:range][:max]) end end create_method(name, [], validators, options) do |value, attributes| [value.to_s, attributes] end end