public
Description: An extension that adds attributes in different languages to Gibberish, ohh, the fun!
Clone URL: git://github.com/jnicklas/gibberish_attributes.git
name age message
file .gitignore Wed Jun 04 01:51:47 -0700 2008 initial checkin [jnicklas]
file LICENSE Wed Jun 04 01:51:47 -0700 2008 initial checkin [jnicklas]
file README Wed Jun 04 01:51:47 -0700 2008 initial checkin [jnicklas]
file Rakefile Wed Jun 04 01:51:47 -0700 2008 initial checkin [jnicklas]
file init.rb Wed Jun 04 01:51:47 -0700 2008 initial checkin [jnicklas]
directory lib/ Wed Jun 04 02:07:51 -0700 2008 mmm, fancy accessor magic [jnicklas]
directory spec/ Wed Jun 04 02:07:51 -0700 2008 mmm, fancy accessor magic [jnicklas]
README
templater
=========

Gibberish attributes is an extension to the gibberish localization plugin, which allows a class's attributes to 
automatically map to different language versions, like this:


    class MyClass
      include GibberishAttributes
      
      attr_accessor :title_en, :title_es, :title_de
      
      translate :title
    
    end
    
    a = MyClass.new

    a.title #=> nil
    a.title = "monkey"
    a.title #=> "monkey"
    
    Gibberish.current_language = :de
    
    a.title #=> nil
    a.title = "affe"
    a.title #=> "affe"
    
    Gibberish.current_language = :en
    
    a.title #=> "monkey"
    
And that is it