Module: Hackershout::Provider
- Extended by:
- Output
- Defined in:
- lib/hackershout/provider.rb,
lib/hackershout/provider/base.rb,
lib/hackershout/provider/reddit.rb,
lib/hackershout/provider/rubyflow.rb,
lib/hackershout/provider/hackernews.rb
Defined Under Namespace
Classes: Base, Hackernews, Reddit, Rubyflow
Class Method Summary
collapse
Methods included from Output
blank, print
Class Method Details
.list ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/hackershout/provider.rb', line 7
def list
{
:hackernews => 'Hackernews',
:rubyflow => 'RubyFlow',
}
end
|
.wants?(provider) ⇒ Boolean
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/hackershout/provider.rb', line 15
def wants?(provider)
name = list[provider]
print "\t#{name} (y/n)? "
return case gets.chomp
when 'y'
check_credentials_for(provider)
when 'n'
false
else
blank
print "I don't understand. Just type y for yes and n for no :)"
wants?(provider)
end
end
|