title: NoMethodError - template.rb:38:in `<main>': undefined method `template' for main:Object (NoMethodError)
body: <p>Here is my code I'm trying to run the method but it keeps on kicking out a <code>NoMethodError: undefined method 'template' for main:Object</code></p>
  
  <p>Can someone please help?</p>
  
  <pre><code>module Template
  
    attr_accessor :source_template, :req_id
  
    def initialize (source_template, req_id)
      @source_template = source_template
      @req_id = req_id
    end
  
    def self.template(source_template, req_id)
      template = String.new(@source_template)
  
      template_split_begin = template.index("e")
      template_split_end = template_split_begin + 6
      template_part_one =
        String.new(self.template[0..(template_split_begin-1)])
      template_part_two =
        String.new(self.template[template.length..template_split_end])
      code = String.new(@req_id)
      final_template =
        String.new(template_part_one + code + template_part_two)
  
  
      template_split_begin_alt = template.index("a")
      template_split_end_alt = template_split_begin_alt + 9
      template_alt =
        String.new(self.template[0..(template_split_begin_alt-1)])
      template_part_two =
        String.new(self.template[template.length..template_split_begin_alt])
      altcode = code[5..7] - code[0..4]
      final_alt_template =
        String.new(template_part_one_alt + altcode + template_part_two_alt)
    end
  end
  
  sample = "Green", 8
  template("Blue", 6)
  </code></pre>