Class: Elibri::ONIX::Release_3_0::Sender
- Inherits:
-
Object
- Object
- Elibri::ONIX::Release_3_0::Sender
- Includes:
- Inspector
- Defined in:
- lib/elibri_onix/onix_3_0/sender.rb
Overview
Sender of the message
Constant Summary collapse
- ATTRIBUTES =
:nodoc:
[ :sender_name, :contact_name, :email_address ]
- RELATIONS =
:nodoc:
[]
Instance Attribute Summary collapse
-
#contact_name ⇒ Object
contact person.
-
#email_address ⇒ Object
contact email.
-
#sender_name ⇒ Object
name of company, which sent the message.
-
#to_xml ⇒ Object
xml representation of sender.
Instance Method Summary collapse
-
#initialize(data) ⇒ Sender
constructor
A new instance of Sender.
-
#inspect_include_fields ⇒ Object
:nodoc:.
Methods included from Inspector
#attribute_for_inspect, #inspect
Constructor Details
#initialize(data) ⇒ Sender
Returns a new instance of Sender.
35 36 37 38 39 40 |
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 35 def initialize(data) @to_xml = data.to_s @sender_name = data.at_xpath('xmlns:SenderName').text @contact_name = data.at_xpath('xmlns:ContactName').text @email_address = data.at_xpath('xmlns:EmailAddress').text end |
Instance Attribute Details
#contact_name ⇒ Object
contact person
14 15 16 |
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 14 def contact_name @contact_name end |
#email_address ⇒ Object
contact email
17 18 19 |
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 17 def email_address @email_address end |
#sender_name ⇒ Object
name of company, which sent the message
11 12 13 |
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 11 def sender_name @sender_name end |
#to_xml ⇒ Object
xml representation of sender
20 21 22 |
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 20 def to_xml @to_xml end |
Instance Method Details
#inspect_include_fields ⇒ Object
:nodoc:
31 32 33 |
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 31 def inspect_include_fields [:sender_name, :contact_name, :email_address] end |