Class: TryPaper::Recipient
- Inherits:
-
Object
- Object
- TryPaper::Recipient
- Defined in:
- lib/TryPaper/recipient.rb
Overview
address object for recipient address
Defined Under Namespace
Classes: InvalidDataError
Instance Attribute Summary collapse
-
#address1 ⇒ Object
Returns the value of attribute address1.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#city ⇒ Object
Returns the value of attribute city.
-
#formatted_address ⇒ Object
readonly
Returns the value of attribute formatted_address.
-
#name ⇒ Object
Returns the value of attribute name.
-
#state ⇒ Object
Returns the value of attribute state.
-
#zipcode ⇒ Object
Returns the value of attribute zipcode.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
set up recipient configuration prior to submission.
-
#initialize(name = "", address1 = "", address2 = "", city = "", state = "", zip = "") ⇒ Recipient
constructor
A new instance of Recipient.
Constructor Details
#initialize(name = "", address1 = "", address2 = "", city = "", state = "", zip = "") ⇒ Recipient
Returns a new instance of Recipient.
11 12 13 14 15 16 17 18 |
# File 'lib/TryPaper/recipient.rb', line 11 def initialize(name = "", address1 = "", address2 = "", city = "", state = "", zip = "") @name = name @address1 = address1 @address2 = address2 @city = city @state = state @zipcode = zip end |
Instance Attribute Details
#address1 ⇒ Object
Returns the value of attribute address1.
8 9 10 |
# File 'lib/TryPaper/recipient.rb', line 8 def address1 @address1 end |
#address2 ⇒ Object
Returns the value of attribute address2.
8 9 10 |
# File 'lib/TryPaper/recipient.rb', line 8 def address2 @address2 end |
#city ⇒ Object
Returns the value of attribute city.
8 9 10 |
# File 'lib/TryPaper/recipient.rb', line 8 def city @city end |
#formatted_address ⇒ Object (readonly)
Returns the value of attribute formatted_address.
9 10 11 |
# File 'lib/TryPaper/recipient.rb', line 9 def formatted_address @formatted_address end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/TryPaper/recipient.rb', line 8 def name @name end |
#state ⇒ Object
Returns the value of attribute state.
8 9 10 |
# File 'lib/TryPaper/recipient.rb', line 8 def state @state end |
#zipcode ⇒ Object
Returns the value of attribute zipcode.
8 9 10 |
# File 'lib/TryPaper/recipient.rb', line 8 def zipcode @zipcode end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
set up recipient configuration prior to submission
33 34 35 |
# File 'lib/TryPaper/recipient.rb', line 33 def configure yield self end |