Project

fugazi

0.0
No commit activity in last 3 years
No release in over 3 years
A simple gem providing a dsl for defining and initializing class fields
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

= 3.3.0
 Project Readme

#fugazi

A simple gem providing a dsl for defining and initializing class fields

example

class Box
  include Fugazi

  fields :content
  defaults x: 0, y: 0
  keywords z: 0
end

# <=>
class Box
  attr_reader :content, :x, :y, :z

  def initialize(content, x = 0, y = 0, z: 0)
    @content = content
    @x = x
    @y = y
    @z = z
  end
end

##implementation fugazi saves the arg labels and default values in class inst variables and combines them with args in #initialize

##todo

block support error handling