deprecated_warning_flag

deprecated_warning_flag() Class Public methods

errors

OpenSSL.errors â [String...] Class Public methods See any remaining errors held in queue. Any errors you see here are probably due to a bug in ruby's OpenSSL implementation.

fips_mode=

OpenSSL.fips_mode = boolean â boolean Class Public methods Turns FIPS mode on or off. Turning on FIPS mode will obviously only have an effect for FIPS-capable installations of the OpenSSL library. Trying to do so otherwise will result in an error. Examples OpenSSL.fips_mode = true # turn FIPS mode on OpenSSL.fips_mode = false # and off again

json_create

json_create(object) Class Public methods Deserializes JSON string by constructing new Struct object with values v serialized by to_json.

new

new(hash=nil) Class Public methods Creates a new OpenStruct object. By default, the resulting OpenStruct object will have no attributes. The optional hash, if given, will generate attributes and values (can be a Hash, an OpenStruct or a Struct). For example: require 'ostruct' hash = { "country" => "Australia", :population => 20_000_000 } data = OpenStruct.new(hash) p data # -> <OpenStruct country="Australia" population=20000000>

==

==(other) Instance Public methods Compares this object and other for equality. An OpenStruct is equal to other when other is an OpenStruct and the two objects' Hash tables are equal.

[]

[](name) Instance Public methods Returns the value of a member. person = OpenStruct.new('name' => 'John Smith', 'age' => 70) person[:age] # => 70, same as ostruct.age

[]=

[]=(name, value) Instance Public methods Sets the value of a member. person = OpenStruct.new('name' => 'John Smith', 'age' => 70) person[:age] = 42 # => equivalent to ostruct.age = 42 person.age # => 42

as_json

as_json(*) Instance Public methods Returns a hash, that will be turned into a JSON object and represent this object.

delete_field

delete_field(name) Instance Public methods Remove the named field from the object. Returns the value that the field contained if it was defined. require 'ostruct' person = OpenStruct.new('name' => 'John Smith', 'age' => 70) person.delete_field('name') # => 'John Smith'