Class: Chid::Commands::StackOverflow
- Inherits:
-
Chid::Command
- Object
- Chid::Command
- Chid::Commands::StackOverflow
- Defined in:
- lib/chid/commands/stack_overflow.rb
Constant Summary
Constants inherited from Chid::Command
Instance Attribute Summary
Attributes inherited from Chid::Command
Instance Method Summary collapse
Methods inherited from Chid::Command
command, help, #initialize, map_options_with_values, run
Constructor Details
This class inherits a constructor from Chid::Command
Instance Method Details
#run ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/chid/commands/stack_overflow.rb', line 28 def run text_to_search = text_to_search = get_text_to_search if text_to_search.empty? questions = ::StackOverflowApi.questions(text_to_search) ::Paginator.new(questions).paginate { |question| question.summary } end |