Class: TitlePage::Contributor

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

Overview

urn:TitleQueryContributor

sequenceNumber - SOAP::SOAPInteger
contributorRole - SOAP::SOAPString
personName - SOAP::SOAPString
personNameInverted - SOAP::SOAPString
titlesBeforeNames - SOAP::SOAPString
keyNames - SOAP::SOAPString

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sequenceNumber = nil, contributorRole = nil, personName = nil, personNameInverted = nil, titlesBeforeNames = nil, keyNames = nil) ⇒ Contributor

Returns a new instance of Contributor.



87
88
89
90
91
92
93
94
# File 'lib/titlepage/titlepage_utils.rb', line 87

def initialize(sequenceNumber = nil, contributorRole = nil, personName = nil, personNameInverted = nil, titlesBeforeNames = nil, keyNames = nil)
  @sequenceNumber = sequenceNumber
  @contributorRole = contributorRole
  @personName = personName
  @personNameInverted = personNameInverted
  @titlesBeforeNames = titlesBeforeNames
  @keyNames = keyNames
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *arguments) ⇒ Object

An older version of soap4r that was used to generate boilerplate code in versions of this gem <= 0.9.3 created methods that started with capitals. Detect when some code calls these old method names and print a deprecation warning.



100
101
102
103
104
105
106
107
108
109
110
# File 'lib/titlepage/titlepage_utils.rb', line 100

def method_missing(method, *arguments)
  new_method = method.to_s[0,1].downcase
  new_method << method.to_s[1,20]

  if self.respond_to?(new_method)
    $stderr.puts "Warning: #{method} is deprecated. Use #{new_method} instead"
    self.send(new_method, *arguments)
  else
    super
  end
end

Instance Attribute Details

#contributorRoleObject

Returns the value of attribute contributorRole.



81
82
83
# File 'lib/titlepage/titlepage_utils.rb', line 81

def contributorRole
  @contributorRole
end

#keyNamesObject

Returns the value of attribute keyNames.



85
86
87
# File 'lib/titlepage/titlepage_utils.rb', line 85

def keyNames
  @keyNames
end

#personNameObject

Returns the value of attribute personName.



82
83
84
# File 'lib/titlepage/titlepage_utils.rb', line 82

def personName
  @personName
end

#personNameInvertedObject

Returns the value of attribute personNameInverted.



83
84
85
# File 'lib/titlepage/titlepage_utils.rb', line 83

def personNameInverted
  @personNameInverted
end

#sequenceNumberObject

Returns the value of attribute sequenceNumber.



80
81
82
# File 'lib/titlepage/titlepage_utils.rb', line 80

def sequenceNumber
  @sequenceNumber
end

#titlesBeforeNamesObject

Returns the value of attribute titlesBeforeNames.



84
85
86
# File 'lib/titlepage/titlepage_utils.rb', line 84

def titlesBeforeNames
  @titlesBeforeNames
end