#21 ✓resolved
bahuvrihi

List should have validation

Reported by bahuvrihi | March 30th, 2009 @ 09:51 PM

Much like list_select.


    def list(&validation); LIST; end
    list_block = lambda do |input|
      args = validate(input, [Array]).collect do |arg|
        arg.kind_of?(String) ? YAML.load(arg) : arg
      end
      
      if validation
        args.collect! {|arg| validation.call(arg) }
      end
      
      args
    end

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Class configurations that map to the command line.

People watching this ticket

Pages