def display_usage():
    return 'Usage: python rgrep [options] pattern files\nThe options are the '\
           'same as grep\n'


def rgrep(pattern='', text='', case='', count=False, version=False):
    if pattern == '' or text == '':
        return display_usage()
    elif not count:
        if case == 'i':
            pattern = pattern.lower()
            text = text.lower()

        return pattern in text


class RGrep(object):
    def __init__(self):
        self.version = 'RGrep (BSD) 0.0.1'
        self.count = False
        self.pattern = ''
        self.text = ''
        self.case = ''

    def get_version(self):
        return self.version

    def get_count(self):
        count = 0
        text = self.text.split('\n')
        for line in text:
            if self.pattern in line:
                count += 1
        return count

@@ -128,292 +128,8 @@
 '%0A%0A%0A
-def rgrep(pattern='', text='', case='', count=False, version=False):%0A    if pattern == '' or text == '':%0A        return display_usage()%0A    elif not count:%0A        if case == 'i':%0A            pattern = pattern.lower()%0A            text = text.lower()%0A%0A        return pattern in text%0A%0A%0A
 clas
@@ -559,8 +559,232 @@
 n count%0A
+%0A    def get_match(self):%0A        return self.pattern in self.text%0A%0A    def get_match_case_insensitive(self):%0A        self.pattern = self.pattern.lower()%0A        self.text = self.text.lower()%0A        return self.get_match()%0A

Add match and case insensitive methods