Class: Pubid::Ccsds::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/pubid/ccsds/builder.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build(parsed_data) ⇒ Object



6
7
8
# File 'lib/pubid/ccsds/builder.rb', line 6

def self.build(parsed_data)
  new.build(parsed_data)
end

Instance Method Details

#build(data) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/pubid/ccsds/builder.rb', line 10

def build(data)
  # Check if corrigenda are present - if so, build Corrigendum objects
  if data[:corrigenda] && !data[:corrigenda].empty?
    return build_corrigendum(data)
  end

  # Build base identifier
  build_base(data)
end