Class: Mailstro::Delivery
Instance Attribute Summary collapse
-
#email_name ⇒ Object
readonly
Returns the value of attribute email_name.
Instance Method Summary collapse
- #data ⇒ Object
- #deliver ⇒ Object
-
#initialize(email_name, options) ⇒ Delivery
constructor
A new instance of Delivery.
- #to ⇒ Object
Constructor Details
#initialize(email_name, options) ⇒ Delivery
Returns a new instance of Delivery.
5 6 7 8 |
# File 'lib/mailstro/delivery.rb', line 5 def initialize(email_name, ) @email_name = email_name @options = end |
Instance Attribute Details
#email_name ⇒ Object (readonly)
Returns the value of attribute email_name.
3 4 5 |
# File 'lib/mailstro/delivery.rb', line 3 def email_name @email_name end |
Instance Method Details
#data ⇒ Object
14 15 16 |
# File 'lib/mailstro/delivery.rb', line 14 def data @options.fetch(:data, nil) end |
#deliver ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/mailstro/delivery.rb', line 18 def deliver post("deliveries", :to => to, :email_name => email_name, :data => data ) end |
#to ⇒ Object
10 11 12 |
# File 'lib/mailstro/delivery.rb', line 10 def to @options.fetch(:to) end |