Class: Module
- Defined in:
- lib/eac_ruby_utils/patches/module/patch.rb,
lib/eac_ruby_utils/patches/module/context.rb,
lib/eac_ruby_utils/patches/module/speaker.rb,
lib/eac_ruby_utils/patches/module/listable.rb,
lib/eac_ruby_utils/patches/module/immutable.rb,
lib/eac_ruby_utils/patches/module/compare_by.rb,
lib/eac_ruby_utils/patches/class/method_class.rb,
lib/eac_ruby_utils/patches/module/require_sub.rb,
lib/eac_ruby_utils/patches/module/simple_cache.rb,
lib/eac_ruby_utils/patches/module/common_concern.rb,
lib/eac_ruby_utils/patches/module/i18n_translate.rb,
lib/eac_ruby_utils/patches/module/abstract_methods.rb,
lib/eac_ruby_utils/patches/module/acts_as_abstract.rb,
lib/eac_ruby_utils/patches/module/acts_as_immutable.rb,
lib/eac_ruby_utils/patches/class/static_method_class.rb,
lib/eac_ruby_utils/patches/module/acts_as_instance_method.rb
Instance Method Summary collapse
-
#acts_as_abstract(*methods) ⇒ void
Include [EacRubyUtils::ActsAsAbstract] and perform EacRubyUtils::ActsAsAbstract.abstract_methods on parameter
methods
. - #acts_as_immutable ⇒ Object
- #acts_as_instance_method ⇒ EacRubyUtils::ActsAsInstanceMethod
- #common_concern(&after_callback) ⇒ Object
- #compare_by(*fields) ⇒ Object
-
#enable_abstract_methods(*methods) ⇒ Object
deprecated
Deprecated.
Use #acts_as_abstract instead.
-
#enable_context ⇒ Object
Patches module with [EacRubyUtils::Contextualizable].
-
#enable_immutable ⇒ Object
deprecated
Deprecated.
Use #acts_as_immutable instead.
- #enable_listable ⇒ Object
- #enable_method_class ⇒ Object
- #enable_simple_cache ⇒ Object
- #enable_speaker ⇒ Object
- #enable_static_method_class ⇒ Object
- #i18n_translate(entry_suffix, values = {}) ⇒ Object
- #patch(patch_module) ⇒ Object
- #require_sub(file_path, options = {}) ⇒ Object
Instance Method Details
#acts_as_abstract(*methods) ⇒ void
This method returns an undefined value.
Include [EacRubyUtils::ActsAsAbstract] and perform EacRubyUtils::ActsAsAbstract.abstract_methods on parameter methods
.
10 11 12 13 |
# File 'lib/eac_ruby_utils/patches/module/acts_as_abstract.rb', line 10 def acts_as_abstract(*methods) include ::EacRubyUtils::ActsAsAbstract abstract_methods(*methods) end |
#acts_as_immutable ⇒ Object
7 8 9 |
# File 'lib/eac_ruby_utils/patches/module/acts_as_immutable.rb', line 7 def acts_as_immutable ::EacRubyUtils.patch(self, ::EacRubyUtils::ActsAsImmutable) end |
#acts_as_instance_method ⇒ EacRubyUtils::ActsAsInstanceMethod
7 8 9 |
# File 'lib/eac_ruby_utils/patches/module/acts_as_instance_method.rb', line 7 def acts_as_instance_method ::EacRubyUtils::ActsAsInstanceMethod.new(self).setup end |
#common_concern(&after_callback) ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/module/common_concern.rb', line 6 def common_concern(&after_callback) ::EacRubyUtils::CommonConcern.new(&after_callback).setup(self) end |
#compare_by(*fields) ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/module/compare_by.rb', line 6 def compare_by(*fields) ::EacRubyUtils::CompareBy.new(fields).apply(self) end |
#enable_abstract_methods(*methods) ⇒ Object
Deprecated.
Use #acts_as_abstract instead.
7 8 9 |
# File 'lib/eac_ruby_utils/patches/module/abstract_methods.rb', line 7 def enable_abstract_methods(*methods) acts_as_abstract(*methods) end |
#enable_context ⇒ Object
Patches module with [EacRubyUtils::Contextualizable].
8 9 10 |
# File 'lib/eac_ruby_utils/patches/module/context.rb', line 8 def enable_context ::EacRubyUtils.patch(self, ::EacRubyUtils::Contextualizable) end |
#enable_immutable ⇒ Object
Deprecated.
Use #acts_as_immutable instead.
8 9 10 |
# File 'lib/eac_ruby_utils/patches/module/immutable.rb', line 8 def enable_immutable ::EacRubyUtils.patch(self, ::EacRubyUtils::ActsAsImmutable) end |
#enable_listable ⇒ Object
7 8 9 |
# File 'lib/eac_ruby_utils/patches/module/listable.rb', line 7 def enable_listable ::EacRubyUtils.patch(self, ::EacRubyUtils::Listable) end |
#enable_method_class ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/class/method_class.rb', line 6 def enable_method_class ::EacRubyUtils.patch(self, ::EacRubyUtils::MethodClass) end |
#enable_simple_cache ⇒ Object
7 8 9 |
# File 'lib/eac_ruby_utils/patches/module/simple_cache.rb', line 7 def enable_simple_cache ::EacRubyUtils.patch(self, ::EacRubyUtils::SimpleCache) end |
#enable_speaker ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/module/speaker.rb', line 6 def enable_speaker include ::EacRubyUtils::Speaker::Sender end |
#enable_static_method_class ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/class/static_method_class.rb', line 6 def enable_static_method_class ::EacRubyUtils.patch(self, ::EacRubyUtils::StaticMethodClass) end |
#i18n_translate(entry_suffix, values = {}) ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/module/i18n_translate.rb', line 6 def i18n_translate(entry_suffix, values = {}) ::EacRubyUtils::Locales::ModuleI18nTranslate.new(self, entry_suffix, values).result end |
#patch(patch_module) ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/module/patch.rb', line 6 def patch(patch_module) ::EacRubyUtils.patch(self, patch_module) end |
#require_sub(file_path, options = {}) ⇒ Object
6 7 8 |
# File 'lib/eac_ruby_utils/patches/module/require_sub.rb', line 6 def require_sub(file_path, = {}) ::EacRubyUtils.require_sub(file_path, { base: self }.merge()) end |