Class: Elibri::ONIX::Release_3_0::Sender

Inherits:
Object
  • Object
show all
Includes:
Inspector
Defined in:
lib/elibri_onix/onix_3_0/sender.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Inspector

#attribute_for_inspect, #inspect

Constructor Details

#initialize(data) ⇒ Sender

Returns a new instance of Sender.



18
19
20
21
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 18

def initialize(data)
  @to_xml = data.to_s
  @sender_name = data.at_css('SenderName').text
end

Instance Attribute Details

#sender_nameObject

name of company, which sent the message



8
9
10
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 8

def sender_name
  @sender_name
end

#to_xmlObject

xml representation of sender



11
12
13
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 11

def to_xml
  @to_xml
end

Instance Method Details

#inspect_include_fieldsObject

:nodoc:



14
15
16
# File 'lib/elibri_onix/onix_3_0/sender.rb', line 14

def inspect_include_fields
  [:sender_name]
end