Class: Rgot::F::CorpusEntry
- Inherits:
-
Object
- Object
- Rgot::F::CorpusEntry
- Defined in:
- lib/rgot/f.rb
Instance Attribute Summary collapse
-
#is_seed ⇒ Object
Returns the value of attribute is_seed.
-
#path ⇒ Object
Returns the value of attribute path.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(values:, is_seed:, path:) ⇒ CorpusEntry
constructor
A new instance of CorpusEntry.
- #mutate_values ⇒ Object
Constructor Details
#initialize(values:, is_seed:, path:) ⇒ CorpusEntry
Returns a new instance of CorpusEntry.
23 24 25 26 27 |
# File 'lib/rgot/f.rb', line 23 def initialize(values:, is_seed:, path:) @values = values @is_seed = is_seed @path = path end |
Instance Attribute Details
#is_seed ⇒ Object
Returns the value of attribute is_seed.
21 22 23 |
# File 'lib/rgot/f.rb', line 21 def is_seed @is_seed end |
#path ⇒ Object
Returns the value of attribute path.
22 23 24 |
# File 'lib/rgot/f.rb', line 22 def path @path end |
#values ⇒ Object
Returns the value of attribute values.
20 21 22 |
# File 'lib/rgot/f.rb', line 20 def values @values end |
Instance Method Details
#mutate_values ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/rgot/f.rb', line 29 def mutate_values @values.map do |value| if generator = SUPPORTED_TYPES[value.class] generator.call(value) else raise "unsupported type #{value.class}" end end end |