Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/adblockplus/lib/puppet/parser/functions/ensure_directory_state.rb

Issue 29370632: NoIssue - Refactor ensure_*state functions (Closed)
Patch Set: Created Jan. 3, 2017, 2:25 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | modules/adblockplus/lib/puppet/parser/functions/ensure_file_state.rb » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # coding: utf-8
2 # vi: set fenc=utf-8 ft=ruby ts=8 sw=2 sts=2 et:
3 module Puppet::Parser::Functions
4
5 newfunction(:ensure_directory_state, :type => :rvalue, :doc => <<-'begin') do |args|
6 Returns "directory" if ensure_state() for the given parameter evaluates to
7 true, return "absent" otherwise.
8 begin
9 result = function_ensure_state(args) ? 'directory' : 'absent'
10 return result
11 end
12
13 end
OLDNEW
« no previous file with comments | « no previous file | modules/adblockplus/lib/puppet/parser/functions/ensure_file_state.rb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld