Module: Kernel

Defined in:
lib/standup/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#bright_ask(message, echo = true) ⇒ Object



6
7
8
9
# File 'lib/standup/core_ext.rb', line 6

def bright_ask message, echo = true
  bright_p message, HighLine::GREEN
  HighLine.new.ask('') {|q| q.echo = echo}
end

#bright_p(message, color = '') ⇒ Object



2
3
4
# File 'lib/standup/core_ext.rb', line 2

def bright_p message, color = ''
  puts "\e[1m#{color}#{message}\e[0m"
end

#local_exec(command) ⇒ Object



11
12
13
14
# File 'lib/standup/core_ext.rb', line 11

def local_exec command
  bright_p command
  `#{command} 2>&1`.tap{|result| puts result}
end