Class: Padrino::Generators::CopyRitJs

Inherits:
Thor::Group
  • Object
show all
Includes:
Actions, Admin::Actions, Thor::Actions
Defined in:
lib/generators/responsive_image_tag/padrino_copy_rit_js.rb

Overview

Defines the generator for installing the Jquery Responsive Image Tag script.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

Defines the “banner” text for the CLI.



13
# File 'lib/generators/responsive_image_tag/padrino_copy_rit_js.rb', line 13

def self.banner; "padrino g copy_rit_js"; end

.source_rootObject

Define the source template root and themes.



11
# File 'lib/generators/responsive_image_tag/padrino_copy_rit_js.rb', line 11

def self.source_root; File.expand_path(File.dirname(__FILE__)); end

Instance Method Details

#copy_javascript_fileObject



24
25
26
27
# File 'lib/generators/responsive_image_tag/padrino_copy_rit_js.rb', line 24

def copy_javascript_file
  template "templates/responsive-image-tag.js",
    destination_root(options[:js_destination] + "/responsive-image-tag.js")
end