Class: Telepost::Fake
- Inherits:
-
Object
- Object
- Telepost::Fake
- Defined in:
- lib/telepost.rb
Overview
Fake one
Instance Attribute Summary collapse
-
#sent ⇒ Object
readonly
Returns the value of attribute sent.
Instance Method Summary collapse
-
#initialize ⇒ Fake
constructor
A new instance of Fake.
- #post(chat, *lines) ⇒ Object
- #run ⇒ Object
- #spam(*lines) ⇒ Object
Constructor Details
#initialize ⇒ Fake
Returns a new instance of Fake.
46 47 48 |
# File 'lib/telepost.rb', line 46 def initialize @sent = [] end |
Instance Attribute Details
#sent ⇒ Object (readonly)
Returns the value of attribute sent.
45 46 47 |
# File 'lib/telepost.rb', line 45 def sent @sent end |
Instance Method Details
#post(chat, *lines) ⇒ Object
58 59 60 |
# File 'lib/telepost.rb', line 58 def post(chat, *lines) @sent << "#{chat}: #{lines.join(' ')}" end |
#run ⇒ Object
50 51 52 |
# File 'lib/telepost.rb', line 50 def run # Nothing to do here end |
#spam(*lines) ⇒ Object
54 55 56 |
# File 'lib/telepost.rb', line 54 def spam(*lines) post(0, lines) end |