Class: Typedocs::TypeSpec::Nil
- Inherits:
-
Typedocs::TypeSpec
- Object
- Typedocs::TypeSpec
- Typedocs::TypeSpec::Nil
- Defined in:
- lib/typedocs/type_spec.rb
Instance Method Summary collapse
- #error_message_for(obj) ⇒ Object
-
#initialize ⇒ Nil
constructor
A new instance of Nil.
- #to_source ⇒ Object
- #valid?(obj) ⇒ Boolean
Constructor Details
#initialize ⇒ Nil
Returns a new instance of Nil.
92 93 94 |
# File 'lib/typedocs/type_spec.rb', line 92 def initialize @value = nil end |
Instance Method Details
#error_message_for(obj) ⇒ Object
101 102 103 |
# File 'lib/typedocs/type_spec.rb', line 101 def (obj) "#{obj} should == #{@value.inspect}" end |
#to_source ⇒ Object
98 99 100 |
# File 'lib/typedocs/type_spec.rb', line 98 def to_source @value.inspect end |
#valid?(obj) ⇒ Boolean
95 96 97 |
# File 'lib/typedocs/type_spec.rb', line 95 def valid?(obj) obj == @value end |