RubyGems Navigation menu

base 0.0.2

People love Base classes! They have tons of methods waiting to be used. Just check out `ActiveRecord::Base`'s method list: >> ActiveRecord::Base.methods.length => 530 But why stop there? Why not have even more methods? In fact, let's put *every method* on one Base class! So I did. It's called Base. Just subclass it and feel free to directly reference any class method, instance method, or constant defined on any module or class in the system. Like this: class Cantaloupe < Base def embiggen encode64(deflate(SEPARATOR)) end end >> Cantaloupe.new.embiggen => "eJzTBwAAMAAw\n" See that `embiggen` method calling `encode64` and `deflate` methods? Those come from the `Base64` and `Zlib` modules. And the `SEPARATOR` constant is defined in `File`. Base don't care where it's defined! Base calls what it wants! By the way, remember those 530 ActiveRecord methods? That's amateur stuff. Check out Base loaded inside a Rails app: >> Base.new.methods.count => 6947 It's so badass that it takes *five seconds* just to answer that question! Base is just craaazzy! It's the most fearless class in all of Ruby. Base doesn't afraid of anything!

Gemfile:
= Copier Copié!

installation:
=

Versions:

  1. 0.0.2 - September 03, 2011 (6,5 ko)
  2. 0.0.1 - September 02, 2011 (6,5 ko)
Voir toutes les versions (3)

Dépendances de Development (2):

hoe ~> 2.12
rspec >= 2.1.0

Propriétaires:

Auteurs:

  • Gary Bernhardt

Total de contrôle SHA 256:

5e632338c58205fba289b19da0b904f8daa99becf15ce750ac5321785bd08653

Total de téléchargements 11 114

Pour cette version 6 898

License:

aucune

Version de Ruby requise: None

Liens: