Method: Protobuf::Message::Fields::ClassMethods#remove_existing_accessors
- Defined in:
- lib/protobuf/message/fields.rb
#remove_existing_accessors(accessor) ⇒ Object
198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/protobuf/message/fields.rb', line 198 def remove_existing_accessors(accessor) field_store.delete(accessor.to_sym).try(:fully_qualified_name_only!) field_store.delete(accessor.to_s) ACCESSOR_SUFFIXES.each do |modifier| begin remove_method("#{accessor}#{modifier}") # rubocop: disable Lint/HandleExceptions rescue NameError # Do not remove the method end end end |