When rubygems/test_case is required the default user interaction is a MockGemUi
.
Module
that defines the default UserInteraction
. Any class including this module will have access to the ui
method that returns the default UI.
UserInteraction
allows RubyGems to interact with the user through standard methods that can be replaced with more-specific UI methods for different displays.
Since UserInteraction
dispatches to a concrete UI class you may need to reference other classes for specific behavior such as Gem::ConsoleUI
or Gem::SilentUI
.
Example:
class X include Gem::UserInteraction def get_answer n = ask("What is the meaning of life?") end end
Returns a JSON
string containing a JSON
array, that is generated from this Array
instance. state is a JSON::State object, that can also be used to configure the produced JSON
string output further.
Instantiates a new State
object, configured by opts.
opts can have the following keys:
indent: a string used to indent levels (default: ”),
space: a string that is put after, a : or , delimiter (default: ”),
space_before: a string that is put before a : pair delimiter (default: ”),
object_nl: a string that is put at the end of a JSON
object (default: ”),
array_nl: a string that is put at the end of a JSON
array (default: ”),
allow_nan: true if NaN, Infinity, and -Infinity should be generated, otherwise an exception is thrown, if these values are encountered. This options defaults to false.
buffer_initial_length: sets the initial length of the generator’s internal buffer.
Creates a new instance of OpenSSL::PKey::EC::Point
. If the only argument is an instance of EC::Point
, a copy is returned. Otherwise, creates a point that belongs to group.
encoded_point is the octet string representation of the point. This must be either a String
or an OpenSSL::BN
.
Creates a new EC::Group
object.
ec_method is a symbol that represents an EC_METHOD. Currently the following are supported:
:GFp_simple
:GFp_mont
:GFp_nist
:GF2m_simple
If the first argument is :GFp or :GF2m, creates a new curve with given parameters.
Creates a new generic resource.
Creates a new DomainName
from name
.
Creates a new SOA
record. See the attr documentation for the details of each argument.
Creates a new HINFO
running os
on cpu
.
Creates a new MX
record with preference
, accepting mail at exchange
.