lib/generators/settings/gemfile.rb in dslable-0.0.2 vs lib/generators/settings/gemfile.rb in dslable-0.0.3

- old
+ new

@@ -1,12 +1,12 @@ # encoding: utf-8 -require "generators/generators" -require "dslable_dsl" +require 'generators/generators' +require 'dslable_dsl' module Dslable::Generators::Settings class Gemfile - GEMFILE_TEMPLATE =<<-EOF + GEMFILE_TEMPLATE = <<-EOF source 'https://rubygems.org' gemspec gem "rspec", "~> 2.14.1" gem "thor", "~> 0.18.1" @@ -16,19 +16,19 @@ gem "tudu", "~> 0.0.4" EOF attr_accessor :dsl - #== initialize dsl model - #=== Params + # == initialize dsl model + # === Params #- _dsl: input from dsl def initialize(_dsl) - raise InvalidDslError.new("dsl not allow nil") if _dsl.nil? + fail InvalidDslError.new('dsl not allow nil') if _dsl.nil? @dsl = _dsl end def generate - File.open("./Gemfile", "w") {|f|f.puts GEMFILE_TEMPLATE} + File.open('./Gemfile', 'w') { |f|f.puts GEMFILE_TEMPLATE } end end - class InvalidDslError < StandardError;end + class InvalidDslError < StandardError; end end