Module: RComp::Env
Constant Summary collapse
- @@conf =
Conf.instance
Instance Method Summary collapse
-
#command_exists? ⇒ Boolean
Checks for the existance of a command to test with.
-
#guard_initialized ⇒ Object
Emit error unless RComp is not fully initialized.
-
#guard_uninitialized ⇒ Object
Emit error unless RComp is fully initialized.
-
#initialize_directories ⇒ Object
Create RComp directories if they don’t already exist.
Methods included from Actions
mkdir, mkpath, mkpath_to, rm, rm_rf, touch
Instance Method Details
#command_exists? ⇒ Boolean
Checks for the existance of a command to test with
Returns a boolean
41 42 43 |
# File 'lib/rcomp/env.rb', line 41 def command_exists? @@conf.command end |
#guard_initialized ⇒ Object
Emit error unless RComp is not fully initialized
Returns nothing
21 22 23 24 25 26 |
# File 'lib/rcomp/env.rb', line 21 def guard_initialized if initialized? puts "RComp already initialized" exit 1 end end |
#guard_uninitialized ⇒ Object
Emit error unless RComp is fully initialized
Returns nothing
12 13 14 15 16 |
# File 'lib/rcomp/env.rb', line 12 def guard_uninitialized guard_command_exists guard_root_dir_exists guard_root_subdirs_exist end |
#initialize_directories ⇒ Object
Create RComp directories if they don’t already exist
Returns nothing
31 32 33 34 35 36 |
# File 'lib/rcomp/env.rb', line 31 def initialize_directories mkpath @@conf.root mkdir @@conf.test_root mkdir @@conf.expected_root mkdir @@conf.result_root end |