Sha256: ef1d62c44ce4e80951e4d795d98fb944d1fc4c9e963e618e0c4a2e7233831d82

Contents?: true

Size: 803 Bytes

Versions: 2

Compression:

Stored size: 803 Bytes

Contents

module RocketApi
  module Commands
    module GemsDir
      # @param [String] name
      def init_gems_version!(name)
        dir_name = "lib/#{name}"
        create_dir(dir_name)
        file_name = "#{dir_name}/version.rb"
        create_single_file(
          file_name,
          plain_version_text(class_name_camel(name))
        )
      end

      # @param [String] name
      def init_gems_main_file!(name)
        file_name = "lib/#{name}.rb"
        text = "class #{class_name_camel(name)}; end"
        create_single_file(file_name, text)
      end

      # @param [String] name
      def init_gemspec!(name)
        file_name = "#{name}.gemspec"
        create_single_file(
          file_name,
          plain_gemspec_text(name, class_name_camel(name))
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rocket_api-0.0.1.5 lib/rocket_api/commands/gems_dir.rb
rocket_api-0.0.1.4 lib/rocket_api/commands/gems_dir.rb