class InlineSubroutineDeclarationSmoosher implements IndexedSmoosher<String> {

    @Override
    public boolean canSmoosh(final String line) {
        if (line == null) {
            throw new IllegalArgumentException("Line cannot be null.");
        }

        return Pattern.compile("^\\s*subroutine\\s*\\(.*", Pattern.CASE_INSENSITIVE).matcher(line).matches();
    }

}