Class: Yema::Rule::Required

Inherits:
Yema::Rule show all
Defined in:
lib/yema/rule/required.rb

Instance Attribute Summary

Attributes inherited from Yema::Rule

#attribute_name

Instance Method Summary collapse

Methods inherited from Yema::Rule

#errors, #initialize, required_options

Constructor Details

This class inherits a constructor from Yema::Rule

Instance Method Details

#matches?(value) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/yema/rule/required.rb', line 5

def matches?(value)
  !blank?(value)
end