Module: Mutils::Serialization::Methods::Main

Defined in:
lib/mutils/serialization/methods/main.rb

Overview

Module Main

Instance Method Summary collapse

Instance Method Details

#class_exists?(class_name) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
20
21
# File 'lib/mutils/serialization/methods/main.rb', line 16

def class_exists?(class_name)
  klass = Mutils::Lib::Helper.instance.constantize(class_name.to_s)
  klass && defined?(klass) && klass.is_a?(Class)
rescue StandardError
  false
end

#name_tag(name_tag, root = nil) ⇒ Object



11
12
13
14
# File 'lib/mutils/serialization/methods/main.rb', line 11

def name_tag(name_tag, root = nil)
  self.serializer_name = name_tag
  self.include_root = root
end