Module: EacRubyUtils::ActsAsAbstract::ClassMethods

Defined in:
lib/eac_ruby_utils/acts_as_abstract.rb

Instance Method Summary collapse

Instance Method Details

#abstract_method(name, *arguments) ⇒ void

This method returns an undefined value.

Parameters:



43
44
45
# File 'lib/eac_ruby_utils/acts_as_abstract.rb', line 43

def abstract_method(name, *arguments)
  abstract_methods_hash[name.to_sym] = arguments
end

#abstract_methods(*methods_names) ⇒ void

This method returns an undefined value.

Parameters:

  • methods_names (Enumerable<Object>)

    Each item can be a symbolizable or a hash.



49
50
51
52
53
54
55
56
57
# File 'lib/eac_ruby_utils/acts_as_abstract.rb', line 49

def abstract_methods(*methods_names)
  methods_names.each do |method_name|
    if method_name.is_a?(::Hash)
      abstract_methods_from_hash(method_name)
    else
      abstract_method(method_name)
    end
  end
end