Flowdock
method

[]=

Importance_1
v2_1_10 - Show latest stable - 0 notes - Class: OpenStruct
[]=(name, value) public

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
Show source
Register or log in to add new notes.