method
new_ostruct_member
new_ostruct_member(name)
public
Hide source
# File lib/ostruct.rb, line 78 def new_ostruct_member(name) name = name.to_sym unless self.respond_to?(name) class << self; self; end.class_eval do define_method(name) { @table[name] } define_method("#{name}=") { |x| modifiable[name] = x } end end name end