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.
47 48 49 |
# File 'lib/telepost.rb', line 47 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
59 60 61 |
# File 'lib/telepost.rb', line 59 def post(chat, *lines) @sent << "#{chat}: #{lines.join(' ')}" end |
#run ⇒ Object
51 52 53 |
# File 'lib/telepost.rb', line 51 def run # Nothing to do here end |
#spam(*lines) ⇒ Object
55 56 57 |
# File 'lib/telepost.rb', line 55 def spam(*lines) post(0, lines) end |