Module: Kabutops::Extensions::Includable
- Included in:
- CrawlerExtensions::Debugging, CrawlerExtensions::ElasticSearch, CrawlerExtensions::PStoreStorage, CallbackSupport, Logging, Parameterable
- Defined in:
- lib/kabutops/extensions/includable.rb
Overview
inspired by ActiveSupport::Concern
Instance Method Summary collapse
Instance Method Details
#append_features(base) ⇒ Object
8 9 10 11 12 |
# File 'lib/kabutops/extensions/includable.rb', line 8 def append_features(base) super base.extend const_get(:ClassMethods) if const_defined?(:ClassMethods) base.class_eval(&@_included) if instance_variable_defined?(:@_included) end |
#included(base = nil, &block) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/kabutops/extensions/includable.rb', line 14 def included(base = nil, &block) if base.nil? @_included = block else super end end |