Class: Typespec::Value
- Inherits:
-
Object
- Object
- Typespec::Value
- Defined in:
- lib/typespec.rb
Overview
…
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value) ⇒ Value
constructor
A new instance of Value.
- #valid?(value) ⇒ Boolean
Constructor Details
#initialize(value) ⇒ Value
Returns a new instance of Value.
35 |
# File 'lib/typespec.rb', line 35 def initialize(value); @value = value; end |
Class Method Details
.[](value) ⇒ Object
36 |
# File 'lib/typespec.rb', line 36 def self.[](value); self.new(value); end |
Instance Method Details
#valid?(value) ⇒ Boolean
37 |
# File 'lib/typespec.rb', line 37 def valid?(value) value.eql?(@value); end |