[]=

[]=(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
doc_ruby_on_rails
2015-04-26 20:24:35
Comments
Leave a Comment

Please login to continue.