Class: ExcADG::Payload::Example::Sleepy

Inherits:
Object
  • Object
show all
Includes:
ExcADG::Payload
Defined in:
lib/excadg/payload/example.rb

Overview

payload that sleeps @args or 1 second(s)

Instance Attribute Summary

Attributes included from ExcADG::Payload

#args

Instance Method Summary collapse

Methods included from ExcADG::Payload

#initialize

Instance Method Details

#getObject



51
52
53
# File 'lib/excadg/payload/example.rb', line 51

def get
  -> { sleep @args }
end

#sanitize(args) ⇒ Object



55
56
57
# File 'lib/excadg/payload/example.rb', line 55

def sanitize args
  args.is_a?(Integer) ? args : 0.1
end