Sha256: 07ef6ebe03422b515aca6b9144ae3f380465cbdcb900a215f50712bb817ee3a2

Contents?: true

Size: 375 Bytes

Versions: 2

Compression:

Stored size: 375 Bytes

Contents

module CommitMsgUrlShortener
  class HookCode
    attr_reader :interpreter, :code
    def initialize interpreter, code
      @interpreter = interpreter
      @code = code
    end

    def self.fabricate path
      interpreter = File.basename(path).gsub(File.extname(path), '').downcase
      code = File.read(path).strip
      HookCode.new interpreter, code
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
commit-msg-url-shortener-0.0.2 lib/commit-msg-url-shortener/hook_code.rb
commit-msg-url-shortener-0.0.1 lib/commit-msg-url-shortener/hook_code.rb