Class: Module

### Home Classes Methods

### In Files

- lib/abstract.rb

### Parent

Object

### Methods

- #abstract_method

### Class/Module Index

Quicksearch

- Kernel
- Module

No matching classes.

# Module

### Public Instance Methods

abstract_method(args_str, *method_names) click to toggle source

define abstract methods

    # File lib/abstract.rb, line 41
    def abstract_method args_str, *method_names
      method_names.each do |name|
        module_eval         def #{name}(#{args_str})          mesg = "class \#{self.class.name} must implement abstract method `#{self.name}##{name}()'."          #mesg = "\#{self.class.name}##{name}() is not implemented."          err = NotImplementedError.new mesg          err.set_backtrace caller()          raise err        end
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.