method

[]

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

Returns the value of a member.

person = OpenStruct.new('name' => 'John Smith', 'age' => 70)
person[:age] # => 70, same as ostruct.age
Show source
Register or log in to add new notes.