Skip to content

Commit

Permalink
0.0.7
Browse files Browse the repository at this point in the history
A.sk: return response without block
  • Loading branch information
Ryan Brewster committed Feb 11, 2015
1 parent f584751 commit f070858
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gemspec
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.license = 'MIT'
s.name = 'cli_miami'
s.summary = 'A feature rich alternative for `gets` and `puts` for your cli interface'
s.version = '0.0.6'
s.version = '0.0.7'
s.required_ruby_version = '>= 1.9'
s.add_runtime_dependency 'term-ansicolor', '~> 1.3'
s.add_development_dependency 'guard', '~> 2.6'
Expand Down
7 changes: 6 additions & 1 deletion lib/cli_miami/ask.rb
Expand Up @@ -37,7 +37,12 @@ def self.sk question, options = {}, &block
$stdin.gets
end.rstrip

yield output if block
# return response if no block is passed
if block
yield output
else
return output
end
end

private
Expand Down

0 comments on commit f070858

Please sign in to comment.