Class: FacturX::Contact
- Inherits:
-
Object
- Object
- FacturX::Contact
- Defined in:
- lib/factur_x/contact.rb
Instance Attribute Summary collapse
-
#department_name ⇒ Object
readonly
Returns the value of attribute department_name.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#person_name ⇒ Object
readonly
Returns the value of attribute person_name.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(person_name: nil, department_name: nil, phone: nil, email: nil) ⇒ Contact
constructor
A new instance of Contact.
Constructor Details
#initialize(person_name: nil, department_name: nil, phone: nil, email: nil) ⇒ Contact
Returns a new instance of Contact.
7 8 9 10 11 12 |
# File 'lib/factur_x/contact.rb', line 7 def initialize(person_name: nil, department_name: nil, phone: nil, email: nil) @person_name = person_name @department_name = department_name @phone = phone @email = email end |
Instance Attribute Details
#department_name ⇒ Object (readonly)
Returns the value of attribute department_name.
5 6 7 |
# File 'lib/factur_x/contact.rb', line 5 def department_name @department_name end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
5 6 7 |
# File 'lib/factur_x/contact.rb', line 5 def email @email end |
#person_name ⇒ Object (readonly)
Returns the value of attribute person_name.
5 6 7 |
# File 'lib/factur_x/contact.rb', line 5 def person_name @person_name end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
5 6 7 |
# File 'lib/factur_x/contact.rb', line 5 def phone @phone end |
Instance Method Details
#empty? ⇒ Boolean
14 15 16 |
# File 'lib/factur_x/contact.rb', line 14 def empty? [person_name, department_name, phone, email].all?(&:nil?) end |