Class: Woodpecker::Campaign
- Inherits:
-
Object
- Object
- Woodpecker::Campaign
- Defined in:
- lib/woodpecker/campaign.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
Returns the value of attribute created.
-
#from_email ⇒ Object
Returns the value of attribute from_email.
-
#from_name ⇒ Object
Returns the value of attribute from_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(campaign) ⇒ Campaign
constructor
A new instance of Campaign.
Constructor Details
#initialize(campaign) ⇒ Campaign
Returns a new instance of Campaign.
9 10 11 12 13 14 15 16 |
# File 'lib/woodpecker/campaign.rb', line 9 def initialize(campaign) @id = campaign[:id] @name = campaign[:name] @status = campaign[:status] @from_name = campaign[:from_name] @from_email = campaign[:from_email] @created = Time.parse(campaign[:created]) end |
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created.
7 8 9 |
# File 'lib/woodpecker/campaign.rb', line 7 def created @created end |
#from_email ⇒ Object
Returns the value of attribute from_email.
7 8 9 |
# File 'lib/woodpecker/campaign.rb', line 7 def from_email @from_email end |
#from_name ⇒ Object
Returns the value of attribute from_name.
7 8 9 |
# File 'lib/woodpecker/campaign.rb', line 7 def from_name @from_name end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/woodpecker/campaign.rb', line 7 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/woodpecker/campaign.rb', line 7 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'lib/woodpecker/campaign.rb', line 7 def status @status end |