Class: Cirneco::Work

Inherits:
Bolognese::Metadata
  • Object
show all
Includes:
Api, Base, Utils
Defined in:
lib/cirneco/work.rb

Constant Summary

Constants included from Utils

Utils::UPPER_LIMIT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#decode_doi, #encode_doi, #generate_accession_number, #generate_state_change_template, #generate_transfer_template, #get_dois_by_prefix

Methods included from Api

#delete_metadata, #get_doi, #get_dois, #get_media, #get_metadata, #get_rest_doi, #post_media, #post_metadata, #put_doi, #put_metadata, #transfer_doi, #update_rest_doi

Constructor Details

#initialize(input: nil, from: nil, **options) ⇒ Work

Returns a new instance of Work.



14
15
16
17
18
19
20
# File 'lib/cirneco/work.rb', line 14

def initialize(input: nil, from: nil, **options)
  @media = options[:media]
  @username = options[:username]
  @password = options[:password]

  return super(input: input, from: from, doi: options[:doi])
end

Instance Attribute Details

#mediaObject (readonly)

Returns the value of attribute media.



12
13
14
# File 'lib/cirneco/work.rb', line 12

def media
  @media
end

#passwordObject (readonly)

Returns the value of attribute password.



12
13
14
# File 'lib/cirneco/work.rb', line 12

def password
  @password
end

#usernameObject (readonly)

Returns the value of attribute username.



12
13
14
# File 'lib/cirneco/work.rb', line 12

def username
  @username
end