lib/Checked/Base/DSL.rb in Checked-1.0.0 vs lib/Checked/Base/DSL.rb in Checked-1.1.0
- old
+ new
@@ -2,13 +2,21 @@
module Checked
module DSL
# ============ Demand ==============
- %w{ String Array Hash }.each { |name|
+ %w{ String Array File_Path Hash Bool }.each { |name|
eval %~
def #{name}!( *args )
#{name.downcase}!(*args).check!
+ end
+ ~
+ }
+
+ %w{ True False }.each { |bool|
+ eval %~
+ def #{bool}! *args
+ bool!(*args).#{bool.downcase}!
end
~
}
%w{ var array bool file_path string symbol hash }.each { |klass|