Class: Yema::Rule
- Inherits:
-
Object
- Object
- Yema::Rule
- Defined in:
- lib/yema/rule.rb,
lib/yema/rule/format.rb,
lib/yema/rule/length.rb,
lib/yema/rule/required.rb,
lib/yema/rule/inclusion.rb,
lib/yema/rule/strong_type.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Format, Inclusion, Length, Required, StrongType
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
Class Method Summary collapse
Instance Method Summary collapse
- #errors(resource) ⇒ Object
-
#initialize(attribute_name, options = {}) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(attribute_name, options = {}) ⇒ Rule
Returns a new instance of Rule.
7 8 9 10 |
# File 'lib/yema/rule.rb', line 7 def initialize(attribute_name, ={}) () @attribute_name = attribute_name end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
5 6 7 |
# File 'lib/yema/rule.rb', line 5 def attribute_name @attribute_name end |
Class Method Details
.required_options ⇒ Object
12 13 14 |
# File 'lib/yema/rule.rb', line 12 def self. [] end |