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

Version Path
card-1.18.6 tmpsets/set/mod007-05_standard/type/number.rb
card-1.18.5 tmpsets/set/mod007-05_standard/type/number.rb
card-1.18.4 tmpsets/set/mod007-05_standard/type/number.rb
card-1.18.3 tmpsets/set/mod007-05_standard/type/number.rb
card-1.18.2 tmpsets/set/mod007-05_standard/type/number.rb
card-1.18.1 tmpsets/set/mod007-05_standard/type/number.rb
card-1.18.0 tmpsets/set/mod007-05_standard/type/number.rb
card-1.17.4 tmpsets/set/mod007-05_standard/type/number.rb
card-1.17.3 tmpsets/set/mod007-05_standard/type/number.rb
card-1.17.2 tmpsets/set/mod007-05_standard/type/number.rb
card-1.17.1 tmpsets/set/mod007-05_standard/type/number.rb
card-1.17.0 tmpsets/set/mod007-05_standard/type/number.rb
card-1.16.15 tmpsets/set/mod007-05_standard/type/number.rb
card-1.16.14 tmpsets/set/mod007-05_standard/type/number.rb
card-1.16.13 tmpsets/set/mod007-05_standard/type/number.rb
card-1.16.12 tmpsets/set/mod007-05_standard/type/number.rb
card-1.16.11 tmpsets/set/mod007-05_standard/type/number.rb
card-1.16.10 tmpsets/set/mod007-05_standard/type/number.rb