Sha256: 864d7d63b248aa77bdffc87a16219ab046b90c5769f235f5ac8882fc530db3e0
Contents?: true
Size: 367 Bytes
Versions: 31
Compression:
Stored size: 367 Bytes
Contents
# frozen_string_literal: true module ActiveMocker class FilePathToRubyClass attr_reader :class_path, :base_path def initialize(base_path:, class_path:) @base_path = base_path @class_path = class_path end def to_s File.basename(class_path.gsub(base_path + "/", "").split("/").map(&:camelize).join("::"), ".rb") end end end
Version data entries
31 entries across 31 versions & 1 rubygems