class Class

Attributes

dont_rubyserial_lst[R]
rubyserial_only_lst[R]

Public Instance Methods

dont_rubyserial(*lst) click to toggle source

Mark some attributes to not be serialized

Parameters
  • 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
rubyserial_only(*lst) click to toggle source

Mark some attributes to be serialized

Parameters
  • 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