module TINCheck::XML
Public Class Methods
hash_or_array(obj) { |obj| ... }
click to toggle source
# File lib/tincheck/xml.rb, line 9 def hash_or_array(obj) case obj when Hash yield(obj) when Array obj.map { |o| yield(o) } else obj end end
parser_with(name)
click to toggle source
# File lib/tincheck/xml.rb, line 20 def parser_with(name) const_get(name)::Parser.new end
serializer_with(name, attributes: Serializer::ATTRIBUTES)
click to toggle source
# File lib/tincheck/xml.rb, line 24 def serializer_with(name, attributes: Serializer::ATTRIBUTES) const_get(name)::Serializer.new(attributes: attributes) end