0.0
The project is in a healthy, maintained state
Auto convert value on setter method call
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Philosophal

If you don't want to manage your parameters' conversation before valuing your objects' instance variables, Philosophal is the gem for you ;-)

Installation

gem install philosophal

Usage

require 'philosophal'

class Person
  extend Philosophal::Properties

  cprop :first_name, String, transform: :downcase
  cprop :last_name, String, transform: :upcase
  cprop :age, Integer
end

maxime = Person.new
maxime.first_name = "Maxime"
maxime.last_name = "Désécot"
maxime.age = "40" 
puts maxime.inspect
#<Person:0x00007da7088eed88 @first_name="maxime", @last_name="DÉSÉCOT", @age=40>