Sha256: 56551a5e4f52a32a1ff0cb7612926586c72bd494732841660e79df4f7961706d
Contents?: true
Size: 888 Bytes
Versions: 3
Compression:
Stored size: 888 Bytes
Contents
# frozen_string_literal: true require "refinements/structs" module Rubysmith module Builders # Builds project skeleton core structure and minimum file support. class Core using Refinements::Structs def self.call(...) = new(...).call def initialize configuration, builder: Builder @configuration = configuration @builder = builder end def call builder.call(configuration.merge(template_path: "%project_name%/lib/%project_path%.rb.erb")) .render .replace(" require", "require") .replace(/ (?=(Zeit|\.tap|\.setup))/, "") .replace("\n \n", "\n\n") builder.call(configuration.merge(template_path: "%project_name%/.ruby-version.erb")).render configuration end private attr_reader :configuration, :builder end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubysmith-1.1.1 | lib/rubysmith/builders/core.rb |
rubysmith-1.1.0 | lib/rubysmith/builders/core.rb |
rubysmith-1.0.0 | lib/rubysmith/builders/core.rb |