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.



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

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



58
59
60
# File 'lib/telepost.rb', line 58

def post(chat, *lines)
  @sent << "#{chat}: #{lines.join(' ')}"
end

#runObject



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