RubyGems Navigation menu

namedarguments 0.0.1

Adds the ability to call class constructors with a hash of arguments to initialize attributes in the new object. == FEATURES/PROBLEMS: class Snark include NamedArguments attr_accessor :color, :size, :name attribute_defaults :color => 'blue', :size => lambda {|s| some_method_call(s)} required_fields :color, :name required_respond_to :name => :to_s required_kind_of? :size => Fixnum type_conversion :size => Fixnum end s = Snark.new :boojum => 7, :color => red == INSTALL:

Gemfile:
= Copier Copié!

installation:
=

Versions:

  1. 0.0.5 - June 03, 2007* (9 ko)
  2. 0.0.3 - December 06, 2006* (8,5 ko)
  3. 0.0.2 - December 05, 2006* (8 ko)
  4. 0.0.1 - December 06, 2006* (8,5 ko)

Dépendances de Runtime (1):

hoe >= 1.1.6

Propriétaires:

Auteurs:

  • James M Moore

Total de contrôle SHA 256:

b40b6701fb318732967d4f26872fed128a7cb526726ef721597f75d3e0052963

Total de téléchargements 15 280

Pour cette version 3 515

License:

aucune

Version de Ruby requise: > 0.0.0

Liens: