Class: Nemo::MetaObject::ValidationRule
- Inherits:
-
Object
- Object
- Nemo::MetaObject::ValidationRule
- Extended by:
- Util::Accessors
- Defined in:
- lib/nemo/metaobject/validation.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ ValidationRule
constructor
A new instance of ValidationRule.
- #valid?(value) ⇒ Boolean
Methods included from Util::Accessors
bool_accessor, call_accessor, proc_accessor
Constructor Details
#initialize(&block) ⇒ ValidationRule
Returns a new instance of ValidationRule.
23 24 25 26 |
# File 'lib/nemo/metaobject/validation.rb', line 23 def initialize(&block) @error_string = 'not valid' @rule = block end |