Class: Woodpecker::Campaign

Inherits:
Object
  • Object
show all
Defined in:
lib/woodpecker/campaign.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#createdObject

Returns the value of attribute created.



7
8
9
# File 'lib/woodpecker/campaign.rb', line 7

def created
  @created
end

#from_emailObject

Returns the value of attribute from_email.



7
8
9
# File 'lib/woodpecker/campaign.rb', line 7

def from_email
  @from_email
end

#from_nameObject

Returns the value of attribute from_name.



7
8
9
# File 'lib/woodpecker/campaign.rb', line 7

def from_name
  @from_name
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/woodpecker/campaign.rb', line 7

def id
  @id
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/woodpecker/campaign.rb', line 7

def name
  @name
end

#statusObject

Returns the value of attribute status.



7
8
9
# File 'lib/woodpecker/campaign.rb', line 7

def status
  @status
end