Module: Schlepper::AbstractMethodHelper

Included in:
Task
Defined in:
lib/schlepper/abstract_method_helper.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
# File 'lib/schlepper/abstract_method_helper.rb', line 3

def self.included(base)
  base.instance_variable_set :@__abstract_methods__, {}
  base.send :extend, Schlepper::AbstractMethodHelper::ClassMethods
end

Instance Method Details

#abstract_method?(method_name) ⇒ Bool

Parameters:

  • method_name (Symbol, String)

Returns:

  • (Bool)


10
11
12
# File 'lib/schlepper/abstract_method_helper.rb', line 10

def abstract_method? method_name
  self.class.__abstract_methods__.fetch method_name.to_sym, false
end