Class: Namero::Value
- Inherits:
-
Object
- Object
- Namero::Value
- Defined in:
- lib/namero/value.rb
Instance Attribute Summary collapse
-
#candidates ⇒ Object
Returns the value of attribute candidates.
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #dup ⇒ Object
-
#initialize(value:, candidates:, index:) ⇒ Value
constructor
A new instance of Value.
Constructor Details
#initialize(value:, candidates:, index:) ⇒ Value
Returns a new instance of Value.
6 7 8 9 10 |
# File 'lib/namero/value.rb', line 6 def initialize(value:, candidates:, index:) @value = value @candidates = candidates @index = index end |
Instance Attribute Details
#candidates ⇒ Object
Returns the value of attribute candidates.
4 5 6 |
# File 'lib/namero/value.rb', line 4 def candidates @candidates end |
#index ⇒ Object (readonly)
Returns the value of attribute index.
3 4 5 |
# File 'lib/namero/value.rb', line 3 def index @index end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/namero/value.rb', line 4 def value @value end |
Instance Method Details
#dup ⇒ Object
12 13 14 |
# File 'lib/namero/value.rb', line 12 def dup self.new(value: value, candidates: candidates.dup) end |