0.0
No commit activity in last 3 years
No release in over 3 years
Abstract Class pattern gem for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

 Project Readme

Abstract Base

A simple Ruby gem for definining abstract classes and interfaces.

Installation

In your Gemfile

gem 'abstract_base'

Usage

class BaseService
  extend AbstractBase
  self.abstract_class = true
  abstract_methods :validate!

  def call
    validate!
    process
  end

  private

  def process
    ...
  end
end

class ChildService < BaseService
  def initialize(value)
    @value = value
  end

  def validate!
    ...
  end
end

Work in progress