Class: Ddenv::Goals::ShadowenvDirGitIgnored
Constant Summary
collapse
- PATH =
".shadowenv.d/.gitignore"
- CONTENTS =
"*\n"
Instance Method Summary
collapse
Methods inherited from Ddenv::Goal
#==, #eql?, #hash, #initialize, #post_goals, #pre_goals, #props, #with_pre_and_post_goals
Constructor Details
This class inherits a constructor from Ddenv::Goal
Instance Method Details
#achieve ⇒ Object
17
18
19
|
# File 'lib/ddenv/goals/shadowenv_dir_git_ignored.rb', line 17
def achieve
File.write(PATH, CONTENTS)
end
|
#achieved? ⇒ Boolean
13
14
15
|
# File 'lib/ddenv/goals/shadowenv_dir_git_ignored.rb', line 13
def achieved?
File.file?(PATH) && File.read(PATH) == CONTENTS
end
|
#message ⇒ Object
9
10
11
|
# File 'lib/ddenv/goals/shadowenv_dir_git_ignored.rb', line 9
def message
"Adding .shadowenv.d to .gitignore"
end
|