lib/hermod/xml_section_builder.rb
# Public: defines a node for sending an integer to HMRC
#
# name    - the name of the node. This will become the name of the method on the XmlSection.
# options - a hash of options used to set up validations.
#
# Returns nothing you should rely on
defines a node for sending an integer to HMRC
name    - the name of the node. This will become the name of the method on the XmlSection.
options - a hash of options used to set up validations.

Returns nothing you should rely on
defines a node for sending an integer to HMRC name - the name of the node . This will become the name of the method on the XmlSection . options - a hash of options used to set up validations . Returns nothing you should rely on
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
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
Public: defines a node for sending an integer to HMRC
name    - the name of the node.
Public : defines a node for sending an integer to HMRC name - the name of the node .
name
options