Project

arrayr

0.0
No commit activity in last 3 years
No release in over 3 years
Let a defined attributes which contain strings return array values
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0
 Project Readme
Arrayr
======

Module to use for letting attributes automatically return arrays for 
comma separated values

Specify which attributes that should return array as values
and access the value by suffixing the attribute with "_multiple"

If a getter and setter doens't exists this module will create them for you.

Example 
-------

  class Foo
    include Arrayr
    attr_arrayr(:bar)
  end
  
  foo = Foo.new
  foo.bar = "zoo, zum"
  foo.bar_to_a  => ["zoo", "zum"]