Module: Preflight::Profile::InstanceMethods

Defined in:
lib/preflight/profile.rb

Instance Method Summary collapse

Instance Method Details

#check(input) ⇒ Object



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

def check(input)
  valid_rules?

  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



51
52
53
# File 'lib/preflight/profile.rb', line 51

def rule(*args)
  instance_rules << args
end