Sha256: 4043f6e6acda6539d756fb412f9c2cba173b54b481f8f0a7f34e709cc61de9db

Contents?: true

Size: 346 Bytes

Versions: 11

Compression:

Stored size: 346 Bytes

Contents

require 'thor/group'

module Prophecy

  module Generators
    class New < Thor::Group
      include Thor::Actions

      argument :title, :type => :string

      def self.source_root
        File.dirname(__FILE__)
      end

      def copy_book
        directory('book', "#{title.downcase.gsub(/[^a-z0-9-]/, '')}")
      end
    end
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
prophecy-0.2.7 lib/prophecy/generators/new.rb
prophecy-0.2.6 lib/prophecy/generators/new.rb
prophecy-0.2.5 lib/prophecy/generators/new.rb
prophecy-0.2.4 lib/prophecy/generators/new.rb
prophecy-0.2.3 lib/prophecy/generators/new.rb
prophecy-0.2.2 lib/prophecy/generators/new.rb
prophecy-0.2.1 lib/prophecy/generators/new.rb
prophecy-0.2.0 lib/prophecy/generators/new.rb
prophecy-0.1.3 lib/prophecy/generators/new.rb
prophecy-0.1.2 lib/prophecy/generators/new.rb
prophecy-0.0.1 lib/prophecy/generators/new.rb