Module: VantivLite::XML::Serializer
- Included in:
- Nokogiri::Serializer, Ox::Serializer, REXML::Serializer
- Defined in:
- lib/vantiv_lite/xml/serializer.rb
Constant Summary collapse
- ATTRIBUTES =
%w[customerId id merchantId reportGroup version xmlns].freeze
- @@type_coercions =
{}
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
18 19 20 |
# File 'lib/vantiv_lite/xml/serializer.rb', line 18 def attributes @attributes end |
Class Method Details
.coerce(type, obj = nil, &blk) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/vantiv_lite/xml/serializer.rb', line 9 def self.coerce(type, obj = nil, &blk) raise TypeError, '`type` must be a `Class`' unless type.is_a?(Class) obj ||= blk raise TypeError, '`obj` must respond to `call`' unless obj.respond_to?(:call) @@type_coercions[type] = obj end |
Instance Method Details
#initialize(attributes: ATTRIBUTES) ⇒ Object
20 21 22 |
# File 'lib/vantiv_lite/xml/serializer.rb', line 20 def initialize(attributes: ATTRIBUTES) @attributes = attributes end |