Class: Kenexa::JobCollectionProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/kenexa/job_collection_proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(envelope) ⇒ JobCollectionProxy

Returns a new instance of JobCollectionProxy.



7
8
9
10
# File 'lib/kenexa/job_collection_proxy.rb', line 7

def initialize(envelope)
  @envelope = envelope
  @jobs = JobParser.new.parse(envelope)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



20
21
22
# File 'lib/kenexa/job_collection_proxy.rb', line 20

def method_missing(meth, *args, &block)
  @jobs.send(meth, *args, &block)
end

Instance Method Details

#max_pagesObject



16
17
18
# File 'lib/kenexa/job_collection_proxy.rb', line 16

def max_pages
  @max_pages ||= @envelope.at("//OtherInformation/MaxPages").text.to_i
end

#totalObject



12
13
14
# File 'lib/kenexa/job_collection_proxy.rb', line 12

def total
  @total ||= @envelope.at("//OtherInformation/TotalRecordsFound").text.to_i
end