Sha256: 89d94d6dd302054ffec061c2ea7850931669405f6129ddd4adb51fe0ddb4ff41
Contents?: true
Size: 733 Bytes
Versions: 18
Compression:
Stored size: 733 Bytes
Contents
# -*- encoding : utf-8 -*- class Card; module Set; module Type; module Number; extend Card::Set # ~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/number.rb ~~~~~~~~~~~ view :editor do |args| text_field :content, class: 'card-content' end event :validate_number, after: :approve do errors.add :content, "'#{content}' is not numeric" unless valid_number?( content ) end def valid_number?( string ) valid = true begin Kernel.Float( string ) rescue ArgumentError, TypeError valid = false end valid end # ~~~~~~~~~~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/05_standard/set/type/number.rb ~~~~~~~~~~~ end;end;end;end;
Version data entries
18 entries across 18 versions & 1 rubygems