Class: TitlePage::Title

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

Overview

urn:TitleQueryTitle

titleType - SOAP::SOAPString
titleText - SOAP::SOAPString
titlePrefix - SOAP::SOAPString
titleWithoutPrefix - SOAP::SOAPString
subtitle - SOAP::SOAPString

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(titleType = nil, titleText = nil, titlePrefix = nil, titleWithoutPrefix = nil, subtitle = nil) ⇒ Title

Returns a new instance of Title.



47
48
49
50
51
52
53
# File 'lib/titlepage/titlepage_utils.rb', line 47

def initialize(titleType = nil, titleText = nil, titlePrefix = nil, titleWithoutPrefix = nil, subtitle = nil)
  @titleType = titleType
  @titleText = titleText
  @titlePrefix = titlePrefix
  @titleWithoutPrefix = titleWithoutPrefix
  @subtitle = subtitle
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.



59
60
61
62
63
64
65
66
67
68
69
# File 'lib/titlepage/titlepage_utils.rb', line 59

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

#subtitleObject

Returns the value of attribute subtitle.



45
46
47
# File 'lib/titlepage/titlepage_utils.rb', line 45

def subtitle
  @subtitle
end

#titlePrefixObject

Returns the value of attribute titlePrefix.



43
44
45
# File 'lib/titlepage/titlepage_utils.rb', line 43

def titlePrefix
  @titlePrefix
end

#titleTextObject

Returns the value of attribute titleText.



42
43
44
# File 'lib/titlepage/titlepage_utils.rb', line 42

def titleText
  @titleText
end

#titleTypeObject

Returns the value of attribute titleType.



41
42
43
# File 'lib/titlepage/titlepage_utils.rb', line 41

def titleType
  @titleType
end

#titleWithoutPrefixObject

Returns the value of attribute titleWithoutPrefix.



44
45
46
# File 'lib/titlepage/titlepage_utils.rb', line 44

def titleWithoutPrefix
  @titleWithoutPrefix
end