module Canvas::Workflow
Constants
- VERSION
Public Class Methods
client()
click to toggle source
config()
click to toggle source
excluded?(file)
click to toggle source
Is file
excluded from upload?
@param file [String] a file name @return [Boolean] true if the file has been excluded from upload.
# File lib/canvas/workflow.rb, line 34 def self.excluded?(file) return false if config['exclude'].nil? # get the list of files that has been explicitly excluded @excluded ||= Dir.glob(config['exclude'].map do |f| if File.directory?(f) if f.end_with?("/") f + "**/*" else f + "/**/*" end else f end end) # check if the param file has been excluded @excluded.include?(file) end
included?(file)
click to toggle source
Is file
included for upload?
@param file [String] a file name @return [Boolean] true if the file has been included for upload.
# File lib/canvas/workflow.rb, line 58 def self.included?(file) return false if config['include'].nil? # get the list of files that has been explicitly included @included ||= Dir.glob(config['include'].map do |f| if File.directory?(f) if f.end_with?("/") f + "**/*" else f + "/**/*" end else f end end) # check if the param file has been included @included.include?(file) end