Class: Struct
Overview
Minor addition to the behavior of a struct.
Direct Known Subclasses
Instance Method Summary collapse
-
#update(obj) ⇒ Object
Using either another struct or a hash, updates all the values of this instance of a struct.
Instance Method Details
#update(obj) ⇒ Object
Using either another struct or a hash, updates all the values of this instance of a struct.
197 198 199 200 201 202 |
# File 'lib/linkparser/utils.rb', line 197 def update(obj) self.members.each {|member| self[member.to_s] = obj[member.intern] || self[member] } self end |