Module: Preflight::Profile::InstanceMethods

Defined in:
lib/preflight/profile.rb

Instance Method Summary collapse

Instance Method Details

#check(input) ⇒ Object



38
39
40
41
42
43
44
45
46
# File 'lib/preflight/profile.rb', line 38

def check(input)
  if File.file?(input)
    check_filename(input)
  elsif input.is_a?(IO)
    check_io(input)
  else
    raise ArgumentError, "input must be a string with a filename or an IO object"
  end
end

#rule(*args) ⇒ Object



48
49
50
# File 'lib/preflight/profile.rb', line 48

def rule(*args)
  instance_rules << args.flatten
end