You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: service.rb
    path of file: ./repos/mitamae/mrblib/mitamae/resource_executor
    
    the code of the file until where you have to start completion: module MItamae
  module ResourceExecutor
    class Service < Base
      def initialize(*)
        super
    
      def apply
        if desired.has_key?(:running)
          if desired.running && !current.running
            run_specinfra(:"start_service#{@under}", attributes.name)
          elsif !desired.running && current.running
            run_specinfra(:"stop_service#{@under}", attributes.name)
          end