Class: Typedocs::TypeSpec::Value
- Inherits:
-
Typedocs::TypeSpec
- Object
- Typedocs::TypeSpec
- Typedocs::TypeSpec::Value
- Defined in:
- lib/typedocs/type_spec.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(val) ⇒ Value
constructor
A new instance of Value.
- #to_source ⇒ Object
- #valid?(obj) ⇒ Boolean
Methods inherited from Typedocs::TypeSpec
Constructor Details
#initialize(val) ⇒ Value
Returns a new instance of Value.
198 199 200 |
# File 'lib/typedocs/type_spec.rb', line 198 def initialize(val) @value = val end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
201 202 203 |
# File 'lib/typedocs/type_spec.rb', line 201 def value @value end |
Instance Method Details
#to_source ⇒ Object
205 206 207 |
# File 'lib/typedocs/type_spec.rb', line 205 def to_source value.inspect end |
#valid?(obj) ⇒ Boolean
202 203 204 |
# File 'lib/typedocs/type_spec.rb', line 202 def valid?(obj) obj == value end |