Class: HTS::Bcf::Format::NumericVectorView

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/hts/bcf/format.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ NumericVectorView

Returns a new instance of NumericVectorView.



22
# File 'lib/hts/bcf/format.rb', line 22

def initialize(type) = @type = type

Instance Method Details

#each(&block) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/hts/bcf/format.rb', line 31

def each(&block)
  return to_enum(__method__) unless block_given?

  ensure_valid!
  @values.each(&block)
  self
end

#reset(values, buffer, generation) ⇒ Object



24
25
26
27
28
29
# File 'lib/hts/bcf/format.rb', line 24

def reset(values, buffer, generation)
  @values = values
  @buffer = buffer
  @generation = generation
  self
end

#to_aObject



39
# File 'lib/hts/bcf/format.rb', line 39

def to_a = each.to_a