Class: RubePost::Email

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, grabber) ⇒ Email

Returns a new instance of Email.



95
96
97
98
99
100
# File 'lib/rube_post.rb', line 95

def initialize(data, grabber)
  @id = data[:id]
  @sender = data[:sender]
  @subject = data[:subject]
  @grabber = grabber
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



93
94
95
# File 'lib/rube_post.rb', line 93

def id
  @id
end

#senderObject (readonly)

Returns the value of attribute sender.



93
94
95
# File 'lib/rube_post.rb', line 93

def sender
  @sender
end

#subjectObject (readonly)

Returns the value of attribute subject.



93
94
95
# File 'lib/rube_post.rb', line 93

def subject
  @subject
end

Instance Method Details

#contentObject



102
103
104
# File 'lib/rube_post.rb', line 102

def content
  @grabber.email_content(@id)
end

#move_to_trashObject



106
107
108
# File 'lib/rube_post.rb', line 106

def move_to_trash
  @grabber.move_to_trash(@id)
end