Sha256: acc06b3163d88f65d775979659882a11dc52591470c7f2b67ed14c1562639b1a
Contents?: true
Size: 380 Bytes
Versions: 2
Compression:
Stored size: 380 Bytes
Contents
require 'active_model' module Metrojobb class Contact < Model attr_accessor :name, :phone, :email def to_xml(builder: Builder::XmlMarkup.new(indent: DEFAULT_INDENT)) builder.contact do |node| node.name { |n| n.cdata!(name.to_s) } node.phone { |n| n.cdata!(phone.to_s) } node.email { |n| n.cdata!(email.to_s) } end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
metrojobb-0.4.0 | lib/metrojobb/contact.rb |
metrojobb-0.3.0 | lib/metrojobb/contact.rb |