Sha256: ef1c4b4ddce502188f7fffbe84c99935bc4938ec7a6c7a5c3717a9d0c531b3b2

Contents?: true

Size: 740 Bytes

Versions: 1

Compression:

Stored size: 740 Bytes

Contents

module FlexaLib
  class AssetsGenerator < Rails::Generators::Base
    #argument :colunas, :type => :array
  
    source_root File.expand_path('../templates', __FILE__)
      
    #class_option :orm
    class_option :no_js,  :type => :boolean,  :default => false, :desc => 'Sem Javascript'
    class_option :no_css,  :type => :boolean,  :default => false, :desc => 'Sem CSS'
    class_option :force,  :type => :boolean,  :default => true, :desc => 'Forçando os Arquivos'
    
    def generate_assets
      if !options.no_css
        copy_file "application.css", "app/assets/stylesheets/application.css"
      end
      if !options.no_js
        copy_file "application.js", "app/assets/javascripts/application.js"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flexa_lib-0.5.0 lib/generators/flexa_lib/assets/assets_generator.rb