Sha256: 837a02c60d465d2d9e203cd0fa8470582ea1e9b088dd2ed4767f80da903c4352

Contents?: true

Size: 515 Bytes

Versions: 21

Compression:

Stored size: 515 Bytes

Contents

# -*- encoding : utf-8 -*-

module Cardio
  module Generators
    # base class for mod-related generators
    class ModBase < ::Rails::Generators::NamedBase
      extend ClassMethods

      class_option "mod-path", aliases: "-m", group: :runtime, desc: "full path for mod"

      def mod_path
        @mod_path = if (path = options["mod-path"])
                      File.expand_path path
                    else
                      File.join "mod", file_name
                    end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
card-1.108.1 lib/cardio/generators/mod_base.rb
card-1.108.0 lib/cardio/generators/mod_base.rb
card-1.107.0 lib/cardio/generators/mod_base.rb
card-1.106.0 lib/cardio/generators/mod_base.rb
card-1.105.6 lib/cardio/generators/mod_base.rb
card-1.105.5 lib/cardio/generators/mod_base.rb
card-1.105.4 lib/cardio/generators/mod_base.rb
card-1.105.3 lib/cardio/generators/mod_base.rb
card-1.105.2.pre1 lib/cardio/generators/mod_base.rb
card-1.105.2 lib/cardio/generators/mod_base.rb
card-1.105.1 lib/cardio/generators/mod_base.rb
card-1.105.0 lib/cardio/generators/mod_base.rb
card-1.104.2 lib/cardio/generators/mod_base.rb
card-1.104.1 lib/cardio/generators/mod_base.rb
card-1.104.0 lib/cardio/generators/mod_base.rb
card-1.103.4 lib/cardio/generators/mod_base.rb
card-1.103.3 lib/cardio/generators/mod_base.rb
card-1.103.2 lib/cardio/generators/mod_base.rb
card-1.103.1 lib/cardio/generators/mod_base.rb
card-1.103.0 lib/cardio/generators/mod_base.rb