Class: RelatonEtsi::PubId

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

Defined Under Namespace

Classes: Parser

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, docnumber:, version:, edition:, date:) ⇒ PubId

Returns a new instance of PubId.



23
24
25
26
27
28
29
# File 'lib/relaton_etsi/pubid.rb', line 23

def initialize(type:, docnumber:, version:, edition:, date:)
  @type = type
  @docnumber = docnumber
  @version = version
  @edition = edition
  @date = date
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



21
22
23
# File 'lib/relaton_etsi/pubid.rb', line 21

def date
  @date
end

#docnumberObject

Returns the value of attribute docnumber.



21
22
23
# File 'lib/relaton_etsi/pubid.rb', line 21

def docnumber
  @docnumber
end

#editionObject

Returns the value of attribute edition.



21
22
23
# File 'lib/relaton_etsi/pubid.rb', line 21

def edition
  @edition
end

#typeObject

Returns the value of attribute type.



21
22
23
# File 'lib/relaton_etsi/pubid.rb', line 21

def type
  @type
end

#versionObject

Returns the value of attribute version.



21
22
23
# File 'lib/relaton_etsi/pubid.rb', line 21

def version
  @version
end

Class Method Details

.parse(id) ⇒ Object



31
32
33
# File 'lib/relaton_etsi/pubid.rb', line 31

def self.parse(id)
  new(**Parser.new(id).parse)
end