Sha256: 2859b923f9e0803578904ac6b5b54f843098db95e84e1b71f07baeb90981fa60
Contents?: true
Size: 732 Bytes
Versions: 1
Compression:
Stored size: 732 Bytes
Contents
# encoding: utf-8 require "generators/generators" require "dslable_dsl" module Dslable::Generators::Settings class Gemfile GEMFILE_TEMPLATE =<<-EOF source 'https://rubygems.org' gemspec gem "rspec", "~> 2.14.1" gem "thor", "~> 0.18.1" gem "simplecov", "~> 0.8.2" gem "activesupport", "~> 4.0.1" gem "activemodel", "~> 4.0.2" EOF attr_accessor :dsl #== initialize dsl model #=== Params #- _dsl: input from dsl def initialize(_dsl) raise InvalidDslError.new("dsl not allow nil") if _dsl.nil? @dsl = _dsl end def generate File.open("./Gemfile", "w") {|f|f.puts GEMFILE_TEMPLATE} end end class InvalidDslError < StandardError;end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dslable-0.0.1 | lib/generators/settings/gemfile.rb |