Class: JosebuilderGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- JosebuilderGenerator
- Defined in:
- lib/generators/josebuilder/josebuilder_generator.rb
Instance Method Summary collapse
- #generate_json_web_encription ⇒ Object
-
#generate_json_web_signature ⇒ Object
class_option :combination, :type => :boolean, :default => false, :description => “combine digital signature and encryption”.
Instance Method Details
#generate_json_web_encription ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/generators/josebuilder/josebuilder_generator.rb', line 26 def generate_json_web_encription ["index", "show"].each do |view| file = filename_with_directory('app/views', view) source = "encryption_" + filename_with_extensions(view) template source, file end if .encryption? end |
#generate_json_web_signature ⇒ Object
class_option :combination, :type => :boolean, :default => false,
:description => "combine digital signature and encryption"
18 19 20 21 22 23 24 |
# File 'lib/generators/josebuilder/josebuilder_generator.rb', line 18 def generate_json_web_signature ["index", "show"].each do |view| file = filename_with_directory('app/views', view) source = "signature_" + filename_with_extensions(view) template source, file end if .signature? end |