Class: Magiq::Types::ID
Instance Attribute Summary
Attributes inherited from Type
Instance Method Summary collapse
Methods inherited from Type
Constructor Details
This class inherits a constructor from Magiq::Types::Type
Instance Method Details
#cast! ⇒ Object
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/magiq/types.rb', line 82 def cast! v = raw.to_i if v > 0 v else bad! "provided value of #{raw.inspect} is not permitted, it must " \ "be a numerical ID greater than zero." end end |