Class: Restspec::Schema::Types::NullType
- Defined in:
- lib/restspec/schema/types/null_type.rb
Instance Method Summary collapse
-
#example_for(attribute) ⇒ Object
Nil.
-
#valid?(attribute, value) ⇒ true, false
If the value is nil.
Methods inherited from BasicType
#initialize, #of, #to_s, #totally_valid?, #|
Constructor Details
This class inherits a constructor from Restspec::Schema::Types::BasicType
Instance Method Details
#example_for(attribute) ⇒ Object
Returns nil.
6 7 8 |
# File 'lib/restspec/schema/types/null_type.rb', line 6 def example_for(attribute) nil end |
#valid?(attribute, value) ⇒ true, false
Returns If the value is nil.
14 15 16 |
# File 'lib/restspec/schema/types/null_type.rb', line 14 def valid?(attribute, value) value.nil? end |