Class: Akane::Storages::Mock
Class Method Summary
collapse
Instance Method Summary
collapse
#exitable?, #initialize, #name, #status, #stop!
Class Method Details
.deletion_marks ⇒ Object
11
12
13
|
# File 'lib/akane/storages/mock.rb', line 11
def deletion_marks
@deletion_marks ||= []
end
|
.recorded_events ⇒ Object
15
16
17
|
# File 'lib/akane/storages/mock.rb', line 15
def recorded_events
@recorded_events ||= []
end
|
.recorded_messages ⇒ Object
19
20
21
|
# File 'lib/akane/storages/mock.rb', line 19
def recorded_messages
@recorded_messages ||= []
end
|
7
8
9
|
# File 'lib/akane/storages/mock.rb', line 7
def
@recorded_tweets ||= []
end
|
.reset! ⇒ Object
23
24
25
26
27
|
# File 'lib/akane/storages/mock.rb', line 23
def reset!
[, deletion_marks,
recorded_events, recorded_messages].each(&:clear)
self
end
|
Instance Method Details
#mark_as_deleted(account, user_id, tweet_id) ⇒ Object
35
36
37
38
|
# File 'lib/akane/storages/mock.rb', line 35
def mark_as_deleted(account, user_id, )
self.class.deletion_marks << [account, user_id, ]
self
end
|
#record_event(account, event) ⇒ Object
40
41
42
43
|
# File 'lib/akane/storages/mock.rb', line 40
def record_event(account, event)
self.class.recorded_events << [account, event]
self
end
|
#record_message(account, message) ⇒ Object
45
46
47
48
|
# File 'lib/akane/storages/mock.rb', line 45
def record_message(account, message)
self.class.recorded_messages << [account, message]
self
end
|
30
31
32
33
|
# File 'lib/akane/storages/mock.rb', line 30
def (account, )
self.class. << [account, ]
self
end
|