Module: Exportr::Command::Helpers

Extended by:
Base
Included in:
Exportr::Command
Defined in:
lib/exportr/command/helpers.rb

Constant Summary

Constants included from Base

Base::CONFIG_FILE, Base::SYSTEM_FILE_PATH

Instance Method Summary collapse

Methods included from Base

config_file, extended, rails_root, system_env_file

Instance Method Details

#error(msg) ⇒ Object



15
16
17
18
19
20
# File 'lib/exportr/command/helpers.rb', line 15

def error msg
  STDERR.puts
  STDERR.puts " | ERROR: #{msg}"
  STDERR.puts
  exit 1
end

#in_rails_application?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/exportr/command/helpers.rb', line 22

def in_rails_application?
  !!rails_root
end

#log(msg = nil) ⇒ Object



11
12
13
# File 'lib/exportr/command/helpers.rb', line 11

def log msg=nil
  STDOUT.puts msg ? " | #{msg}" : ""
end