Class: Cinch::Plugins::Notes::Note

Inherits:
Object
  • Object
show all
Defined in:
lib/cinch/plugins/notes/note.rb

Overview

Object to store note information

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, to, message) ⇒ Note

Returns a new instance of Note.



9
10
11
12
13
14
15
# File 'lib/cinch/plugins/notes/note.rb', line 9

def initialize(from, to, message)
  @from = from
  @to = to
  @message = message
  @sent = false
  @time = Time.now
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



7
8
9
# File 'lib/cinch/plugins/notes/note.rb', line 7

def from
  @from
end

#messageObject

Returns the value of attribute message.



7
8
9
# File 'lib/cinch/plugins/notes/note.rb', line 7

def message
  @message
end

#sentObject

Returns the value of attribute sent.



7
8
9
# File 'lib/cinch/plugins/notes/note.rb', line 7

def sent
  @sent
end

#timeObject

Returns the value of attribute time.



7
8
9
# File 'lib/cinch/plugins/notes/note.rb', line 7

def time
  @time
end

#toObject

Returns the value of attribute to.



7
8
9
# File 'lib/cinch/plugins/notes/note.rb', line 7

def to
  @to
end

Instance Method Details

#mark_sentObject



17
18
19
# File 'lib/cinch/plugins/notes/note.rb', line 17

def mark_sent
  @sent = true
end