Class: Telepost::Fake

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

Overview

Fake one

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFake

Returns a new instance of Fake.



47
48
49
# File 'lib/telepost.rb', line 47

def initialize
  @sent = []
end

Instance Attribute Details

#sentObject (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

#runObject



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