Method: Atomsphere::Action::InstanceMethods#one_of
- Defined in:
- lib/atomsphere/action.rb
#one_of(*params) ⇒ Object
108 109 110 111 112 113 114 115 |
# File 'lib/atomsphere/action.rb', line 108 def one_of *params if params.size < 2 raise ArgumentError, "one_of requires two or more parameters" end class_variable_get(:@@one_of) << [*params] params.each{ |param| attr_accessor param } end |