Mark some attributes to not be serialized
lst (list<Symbol>): List of attributes symbols
# File lib/ruby-serial/_class.rb, line 10 def dont_rubyserial(*lst) lst = [lst] if (!lst.is_a?(Array)) @dont_rubyserial_lst = [] if (!defined?(@dont_rubyserial_lst)) @dont_rubyserial_lst.concat(lst.map { |var_name| "@#{var_name.to_s}".to_sym }) @dont_rubyserial_lst.uniq! end
Mark some attributes to be serialized
lst (list<Symbol>): List of attributes symbols
# File lib/ruby-serial/_class.rb, line 21 def rubyserial_only(*lst) lst = [lst] if (!lst.is_a?(Array)) @rubyserial_only_lst = [] if (!defined?(@rubyserial_only_lst)) @rubyserial_only_lst.concat(lst.map { |var_name| "@#{var_name.to_s}".to_sym }) @rubyserial_only_lst.uniq! end