Class: DeepTest::Distributed::ShellEnvironment
- Inherits:
-
Object
- Object
- DeepTest::Distributed::ShellEnvironment
- Defined in:
- lib/deep_test/distributed/shell_environment.rb
Defined Under Namespace
Classes: SourceFileList
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #include_first(*filenames) ⇒ Object
-
#initialize ⇒ ShellEnvironment
constructor
A new instance of ShellEnvironment.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ ShellEnvironment
Returns a new instance of ShellEnvironment.
11 12 13 |
# File 'lib/deep_test/distributed/shell_environment.rb', line 11 def initialize @source_file_lists = [] end |
Class Method Details
.like_login ⇒ Object
4 5 6 7 8 9 |
# File 'lib/deep_test/distributed/shell_environment.rb', line 4 def self.like_login login_env = new login_env.include_first '/etc/profile' login_env.include_first '~/.profile', '~/.bash_profile', '~/.bashrc' login_env end |
Instance Method Details
#==(other) ⇒ Object
23 24 25 |
# File 'lib/deep_test/distributed/shell_environment.rb', line 23 def ==(other) source_file_lists == other.source_file_lists end |
#include_first(*filenames) ⇒ Object
15 16 17 |
# File 'lib/deep_test/distributed/shell_environment.rb', line 15 def include_first(*filenames) source_file_lists << SourceFileList.new(filenames) end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/deep_test/distributed/shell_environment.rb', line 19 def to_s source_file_lists.join(" && ") end |