Returns time when this timestamp token was created. If status is GRANTED or GRANTED_WITH_MODS, this is never nil
.
Creates a Response
with the help of an OpenSSL::PKey
, an OpenSSL::X509::Certificate
and a Request
.
Mandatory parameters for timestamp creation that need to be set in the Request:
Mandatory parameters that need to be set in the Factory:
In addition one of either Request#policy_id
or Factory#default_policy_id
must be set.
Raises a TimestampError
if creation fails, though successfully created error responses may be returned.
Gets credentials based on user, domain or both. If both are nil, an error occurs
Responsible for finding the nearest targets to the given comment within the context of the given encapsulating node.
Git binary path
Builds extensions. Valid types of extensions are extconf.rb files, configure scripts and rakefiles or mkrf_conf files.
Returns the path to the trusted certificate
Adds to array
all elements from each Array in other_arrays
; returns self
:
a = [0, 1] a.concat([2, 3], [4, 5]) # => [0, 1, 2, 3, 4, 5]
Inserts given objects
before or after the element at Integer
index offset
; returns self
.
When index
is non-negative, inserts all given objects
before the element at offset index
:
a = [:foo, 'bar', 2] a.insert(1, :bat, :bam) # => [:foo, :bat, :bam, "bar", 2]
Extends the array if index
is beyond the array (index >= self.size
):
a = [:foo, 'bar', 2] a.insert(5, :bat, :bam) a # => [:foo, "bar", 2, nil, nil, :bat, :bam]
Does nothing if no objects given:
a = [:foo, 'bar', 2] a.insert(1) a.insert(50) a.insert(-50) a # => [:foo, "bar", 2]
When index
is negative, inserts all given objects
after the element at offset index+self.size
:
a = [:foo, 'bar', 2] a.insert(-2, :bat, :bam) a # => [:foo, "bar", :bat, :bam, 2]
Returns a new Array whose elements are those from self
, sorted.
With no block, compares elements using operator <=>
(see Comparable
):
a = 'abcde'.split('').shuffle a # => ["e", "b", "d", "a", "c"] a1 = a.sort a1 # => ["a", "b", "c", "d", "e"]
With a block, calls the block with each element pair; for each element pair a
and b
, the block should return an integer:
Negative when b
is to follow a
.
Zero when a
and b
are equivalent.
Positive when a
is to follow b
.
Example:
a = 'abcde'.split('').shuffle a # => ["e", "b", "d", "a", "c"] a1 = a.sort {|a, b| a <=> b } a1 # => ["a", "b", "c", "d", "e"] a2 = a.sort {|a, b| b <=> a } a2 # => ["e", "d", "c", "b", "a"]
When the block returns zero, the order for a
and b
is indeterminate, and may be unstable:
a = 'abcde'.split('').shuffle a # => ["e", "b", "d", "a", "c"] a1 = a.sort {|a, b| 0 } a1 # => ["c", "e", "b", "d", "a"]
Related: Enumerable#sort_by
.
Returns self
with its elements sorted in place.
With no block, compares elements using operator <=>
(see Comparable
):
a = 'abcde'.split('').shuffle a # => ["e", "b", "d", "a", "c"] a.sort! a # => ["a", "b", "c", "d", "e"]
With a block, calls the block with each element pair; for each element pair a
and b
, the block should return an integer:
Negative when b
is to follow a
.
Zero when a
and b
are equivalent.
Positive when a
is to follow b
.
Example:
a = 'abcde'.split('').shuffle a # => ["e", "b", "d", "a", "c"] a.sort! {|a, b| a <=> b } a # => ["a", "b", "c", "d", "e"] a.sort! {|a, b| b <=> a } a # => ["e", "d", "c", "b", "a"]
When the block returns zero, the order for a
and b
is indeterminate, and may be unstable:
a = 'abcde'.split('').shuffle a # => ["e", "b", "d", "a", "c"] a.sort! {|a, b| 0 } a # => ["d", "e", "c", "a", "b"]
Returns a new Array containing all non-nil
elements from self
:
a = [nil, 0, nil, 1, nil, 2, nil] a.compact # => [0, 1, 2]