Module: SsciInc::Screening::Model

Included in:
Credit, Criminal, Eviction, Other, PersonSearch, Social
Defined in:
lib/ssci_inc/screening/model.rb

Instance Method Summary collapse

Instance Method Details

#as_xmlObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/ssci_inc/screening/model.rb', line 17

def as_xml
  raise NotImplementedError
end

#builder(attributes = {}) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/ssci_inc/screening/model.rb', line 9

def builder(attributes={})
  Nokogiri::XML::Builder.new do |xml|
    xml.send("Screening", attributes) {
      yield xml if block_given?
    }
  end.parent.root
end

#initialize(h = {}) ⇒ Object



5
6
7
# File 'lib/ssci_inc/screening/model.rb', line 5

def initialize(h={})
  h.each {|k,v| send("#{k}=", v) if respond_to?("#{k}=") }
end

#to_xmlObject



21
22
23
# File 'lib/ssci_inc/screening/model.rb', line 21

def to_xml
  as_xml.to_xml
end