RubyGems Navigation menu

namedarguments 0.0.3

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:
= クリップボードにコピー コピー完了!

インストール:
=

バージョン履歴:

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

Runtime依存関係 (1):

hoe >= 1.1.6

所有者:

作者:

  • James M Moore

SHA 256チェックサム:

72c932cd695285b0ddce1f17610ebbab8e7a312f4e30603d7514af5a66a3114d

累計ダウンロード数 15,241

このバージョンのみ 3,538

ライセンス:

N/A

必要なRubyのバージョン: > 0.0.0

リンク: