module NeverBounce::API::Feature::Oattrs::InstanceMethods
Public Instance Methods
touch()
click to toggle source
Load all oattrs by “touching” them.
irb> resp = client.jobs_delete(job_id: 353701) => #<NeverBounce::API::Response::ErrorMessage:0x0056245978aec8> irb> resp.touch => #<NeverBounce::API::Response::ErrorMessage:0x0056245978aec8 @message="Invalid job ID 353701", @execution_time=15, @status="general_failure">
@return [self]
# File lib/never_bounce/api/feature/oattrs.rb, line 77 def touch self.class.oattrs.each do |name| v = public_send(name) # Touch recursively. Support simple collections. if v.respond_to? :touch v.touch elsif v.is_a? Array v.each { |r| r.touch if r.respond_to? :touch } end end self end