Class: Rgot::F::CorpusEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/rgot/f.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_seedObject

Returns the value of attribute is_seed.



21
22
23
# File 'lib/rgot/f.rb', line 21

def is_seed
  @is_seed
end

#pathObject

Returns the value of attribute path.



22
23
24
# File 'lib/rgot/f.rb', line 22

def path
  @path
end

#valuesObject

Returns the value of attribute values.



20
21
22
# File 'lib/rgot/f.rb', line 20

def values
  @values
end

Instance Method Details

#mutate_valuesObject



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