Project

modeling

0.0
The project is in a healthy, maintained state
Adds the ability to quickly model classes. Definitions of instance variables and access methods are reduced to one line. Creating an instance of the modeled class is significantly slower (~20x), so its use for classes whose instances are created frequently is not recommended.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

modeling - A concise way to define the class shape

Adds the ability to quickly model classes. Definitions of instance variables and access methods are reduced to one line. Creating an instance of the modeled class is significantly slower (~20x), so its use for classes whose instances are created frequently is not recommended.

Basics

require 'modeling'

# with modeling:

class Foo
  model :first, :@R_second
end

# without modeling:

class Foo
  def initialize first, second
    @first = first
    @second = second
  end

  attr_accessor :first
  attr_reader :second
end

Installation

gem install modeling

Usage

Wiki

Authors