Module: Duraflame
- Extended by:
- Duraflame
- Included in:
- Duraflame
- Defined in:
- lib/duraflame.rb,
lib/duraflame/client.rb,
lib/duraflame/message.rb,
lib/duraflame/processor.rb,
lib/duraflame/transcript.rb,
lib/duraflame/translator.rb,
lib/duraflame/user_lookup.rb
Defined Under Namespace
Modules: Translator
Classes: Client, EnterMessage, KickMessage, Message, Processor, TextMessage, TopicChangeMessage, Transcript, UserLookup
Constant Summary
collapse
- VERSION =
'0.2.0'
Instance Method Summary
collapse
Instance Method Details
#execute(options) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/duraflame.rb', line 10
def execute(options)
%w[company token output_dir room].each do |option|
if !options.has_key?(option.to_sym)
abort "Error: Missing option --#{option}. See duraflame --help."
end
instance_variable_set('@' + option, options[option.to_sym])
end
start_date = options.fetch(:start_date, Date.today)
end_date = options.fetch(:end_date, Date.today)
Processor.new(@room, start_date..end_date, @output_dir, http_client).execute
end
|
#http_client ⇒ Object
23
24
25
|
# File 'lib/duraflame.rb', line 23
def http_client
@http_client ||= Client.new(@company, @token)
end
|
#user_names ⇒ Object
27
28
29
|
# File 'lib/duraflame.rb', line 27
def user_names
@user_lookup ||= UserLookup.new(http_client)
end
|