Class: Sam::Header

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

Defined Under Namespace

Classes: Record

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sam, lines) ⇒ Header

Returns a new instance of Header.



36
37
38
39
40
41
42
# File 'lib/sam.rb', line 36

def initialize sam, lines
  @sam = sam
  @records = []
  lines.each do |l|
    @records.push Sam::Header::Record.new(l)
  end
end

Instance Attribute Details

#recordsObject (readonly)

Returns the value of attribute records.



35
36
37
# File 'lib/sam.rb', line 35

def records
  @records
end

Instance Method Details

#output(f) ⇒ Object



44
45
46
47
48
# File 'lib/sam.rb', line 44

def output f
  @records.each do |r|
    f.puts r
  end
end