Class: Class

Inherits:
Object show all
Defined in:
lib/eac_ruby_utils/patches/class/abstract.rb,
lib/eac_ruby_utils/patches/class/settings_provider.rb,
lib/eac_ruby_utils/patches/class/common_constructor.rb,
lib/eac_ruby_utils/patches/class/self_included_modules.rb

Instance Method Summary collapse

Instance Method Details

#abstract?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/eac_ruby_utils/patches/class/abstract.rb', line 6

def abstract?
  ::EacRubyUtils::ActsAsAbstract.abstract?(self)
end

#common_constructorObject



6
7
8
# File 'lib/eac_ruby_utils/patches/class/common_constructor.rb', line 6

def common_constructor(...)
  ::EacRubyUtils::CommonConstructor.new(...).setup_class(self)
end

#enable_settings_providerObject



7
8
9
# File 'lib/eac_ruby_utils/patches/class/settings_provider.rb', line 7

def enable_settings_provider
  ::EacRubyUtils.patch(self, ::EacRubyUtils::SettingsProvider)
end

#self_included_modulesObject



4
5
6
# File 'lib/eac_ruby_utils/patches/class/self_included_modules.rb', line 4

def self_included_modules
  ancestors.take_while { |a| a != superclass }.select { |ancestor| ancestor.instance_of?(Module) }
end