Class: TitlePage::ProductIdentifier

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

Overview

urn:TitleQueryProductIdentifier

productIDType - SOAP::SOAPString
iDValue - SOAP::SOAPString

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(productIDType = nil, iDValue = nil) ⇒ ProductIdentifier

Returns a new instance of ProductIdentifier.



12
13
14
15
# File 'lib/titlepage/titlepage_utils.rb', line 12

def initialize(productIDType = nil, iDValue = nil)
  @productIDType = productIDType
  @iDValue = iDValue
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.



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/titlepage/titlepage_utils.rb', line 21

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

#iDValueObject

Returns the value of attribute iDValue.



10
11
12
# File 'lib/titlepage/titlepage_utils.rb', line 10

def iDValue
  @iDValue
end

#productIDTypeObject

Returns the value of attribute productIDType.



9
10
11
# File 'lib/titlepage/titlepage_utils.rb', line 9

def productIDType
  @productIDType
end