Changes from Version 1 of RubricksDevelopmentActiveArgumentsJa

Show
Ignore:
Author:
uta (IP: 118.6.134.223)
Timestamp:
08/28/08 16:00:51 (2 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RubricksDevelopmentActiveArgumentsJa

    v0 v1  
     1[wiki:WikiStart Top] > [wiki:RubricksDevelopmentGuideJa 開発ガイド] > [wiki:RubricksDevelopmentRailsPluginsJa Rails Plugins] > active_arguments 
     2= active_arguments = 
     3== 対象バージョン == 
     4当ドキュメントは'''active_arguments-0.2.0'''向けです。 
     5 
     6== 概要 == 
     7メソッドの引数の受取を柔軟に行うためのライブラリです。 
     8 
     9== 動作確認環境 == 
     10 * Rails-2.1.0 
     11 * Rails-1.2.6 
     12 
     13== ダウンロード == 
     14 * http://rubyforge.org/projects/rubricks/ 
     15 * svn://dev.rubricks.org/var/svn/rubricks/plugins/active_arguments/trunk/active_arguments/ 
     16 
     17=== 利用方法 === 
     18{{{ 
     19 * flex(args) 
     20   Arrayのインスタンスメソッド 
     21 
     22  ex) 
     23    def sample_method(*args) 
     24      options = args.flex :controller, :action, :id 
     25      p options 
     26    end 
     27 
     28    > sample_method('/sample/index', 'update', 1, {:params => {:name => 'hoge'}}) 
     29      => {:controller => '/sample/index', :action => 'update', :id => 1, :params => {:name => 'hoge'}} 
     30 
     31    > sample_method(:controller => '/sample/index', :action => 'update', :id => 1, :params => {:name => 'hoge'}) 
     32      => {:controller => '/sample/index', :action => 'update', :id => 1, :params => {:name => 'hoge'}} 
     33}}}