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

Side by Side Diff: modules/adblockplus/lib/puppet/parser/functions/ensure_file_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
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_file_state, :type => :rvalue, :doc => <<-'begin') do |args |
6 Returns "present" if ensure_state() for the given parameter evaluates to
7 true, return "absent" otherwise.
8 begin
9 result = function_ensure_state(args) ? 'present' : 'absent'
10 return result
11 end
12
13 end
OLDNEW

Powered by Google App Engine
This is Rietveld