[]=(name, value)
Instance Public methods
Sets the value of a member.
1 2 3 | person = OpenStruct. new ( 'name' => 'John Smith' , 'age' => 70 ) person[ :age ] = 42 # => equivalent to ostruct.age = 42 person.age # => 42 |
Sets the value of a member.
1 2 3 | person = OpenStruct. new ( 'name' => 'John Smith' , 'age' => 70 ) person[ :age ] = 42 # => equivalent to ostruct.age = 42 person.age # => 42 |
Designed by : w10schools
service@w10schools.com
Please login to continue.