You can pass a variety of value as a check target.
# Check of the basic value
args "foo", :bar # If you pass a String or Symbol, determined by whether the value and to fully match
args ["yes", "no"] # Determined by the OR conditions if you pass an array. This declaration accepts "yes" or "no"
args [true, false] # This declaration accepts true or false
args nil # This declaration accepts only nil
# representation of `this method should return self`
returns :self
# If you pass a regular expression, determine whether a string matches the regular expression of interest
args /.md$/
# If you pass the Range, determining whether the value is included in the range of interest (using Range#include?)
args 0..100 # Correct if it is 0 or more and 100 or less of the value
args 0...100 # Correct if the value of 0 or more and less than 100
# any: accept any value (including nil)
args any
# except: accept value except passed value
args except(nil)
args except(String)
# respondable: Determine whether the method with the specified name has been defined (For Duck Typing)
args respondable(:to_s) # Correct if the object that #to_s is defined (using `respond_to? :to_s`)
args respondable(:read, :write) # Correct if the object that #read and #write are defined
# array_of: Determined to be an array of the specified value
args array_of(String) # Array that is composed of String
args array_of([String, nil]) # Array that is composed of String or nil
# hash_of: Determined to be a Hash with the specified key and value
args hash_of(Symbol, String) # Hash that has key of Symbol and value of String
# block: equals to [Proc, nil] - To use when you want to receive a block argument
args block
def block_receive_method(&callback)
...
end