Class: Structish::Validation
- Inherits:
-
Object
- Object
- Structish::Validation
- Defined in:
- lib/structish/validation.rb
Instance Attribute Summary collapse
-
#conditions ⇒ Object
readonly
Returns the value of attribute conditions.
-
#constructor ⇒ Object
readonly
Returns the value of attribute constructor.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, conditions, constructor) ⇒ Validation
constructor
A new instance of Validation.
- #validate ⇒ Object
Constructor Details
#initialize(value, conditions, constructor) ⇒ Validation
Returns a new instance of Validation.
6 7 8 9 10 |
# File 'lib/structish/validation.rb', line 6 def initialize(value, conditions, constructor) @value = value @conditions = conditions @constructor = constructor end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
Returns the value of attribute conditions.
4 5 6 |
# File 'lib/structish/validation.rb', line 4 def conditions @conditions end |
#constructor ⇒ Object (readonly)
Returns the value of attribute constructor.
4 5 6 |
# File 'lib/structish/validation.rb', line 4 def constructor @constructor end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/structish/validation.rb', line 4 def value @value end |
Instance Method Details
#validate ⇒ Object
12 13 14 |
# File 'lib/structish/validation.rb', line 12 def validate raise(NotImplementedError, "Validation conditions function must be defined") end |