Class: TitlePage::Product
- Inherits:
-
Object
- Object
- TitlePage::Product
- Defined in:
- lib/titlepage/titlepage_utils.rb
Overview
urn:TitleQueryProduct
productIdentifiers - TitlePage::ArrayOfProductIdentifier
title - TitlePage::Title
contributors - TitlePage::ArrayOfContributor
supplyDetail - TitlePage::SupplyDetail
Instance Attribute Summary collapse
-
#contributors ⇒ Object
Returns the value of attribute contributors.
-
#productIdentifiers ⇒ Object
Returns the value of attribute productIdentifiers.
-
#supplyDetail ⇒ Object
Returns the value of attribute supplyDetail.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(productIdentifiers = nil, title = nil, contributors = nil, supplyDetail = nil) ⇒ Product
constructor
A new instance of Product.
-
#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.
Constructor Details
#initialize(productIdentifiers = nil, title = nil, contributors = nil, supplyDetail = nil) ⇒ Product
Returns a new instance of Product.
226 227 228 229 230 231 |
# File 'lib/titlepage/titlepage_utils.rb', line 226 def initialize(productIdentifiers = nil, title = nil, contributors = nil, supplyDetail = nil) @productIdentifiers = productIdentifiers @title = title @contributors = contributors @supplyDetail = supplyDetail 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.
237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/titlepage/titlepage_utils.rb', line 237 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
#contributors ⇒ Object
Returns the value of attribute contributors.
223 224 225 |
# File 'lib/titlepage/titlepage_utils.rb', line 223 def contributors @contributors end |
#productIdentifiers ⇒ Object
Returns the value of attribute productIdentifiers.
221 222 223 |
# File 'lib/titlepage/titlepage_utils.rb', line 221 def productIdentifiers @productIdentifiers end |
#supplyDetail ⇒ Object
Returns the value of attribute supplyDetail.
224 225 226 |
# File 'lib/titlepage/titlepage_utils.rb', line 224 def supplyDetail @supplyDetail end |
#title ⇒ Object
Returns the value of attribute title.
222 223 224 |
# File 'lib/titlepage/titlepage_utils.rb', line 222 def title @title end |