Class: Arxiv::Downloader::Identifier

Inherits:
Object
  • Object
show all
Defined in:
lib/arxiv/downloader/identifier.rb

Defined Under Namespace

Classes: Invalid

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ Identifier

Returns a new instance of Identifier.



8
9
10
11
12
13
14
# File 'lib/arxiv/downloader/identifier.rb', line 8

def initialize input
  @input = input
  @cleaned_input = input.dup

  validate_input
  set_id_and_version
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/arxiv/downloader/identifier.rb', line 6

def id
  @id
end

#inputObject (readonly)

Returns the value of attribute input.



6
7
8
# File 'lib/arxiv/downloader/identifier.rb', line 6

def input
  @input
end

#versionObject (readonly)

Returns the value of attribute version.



6
7
8
# File 'lib/arxiv/downloader/identifier.rb', line 6

def version
  @version
end