Class: PomHelperTemplate

Inherits:
Template show all
Defined in:
lib/generators/templates/helpers/pom_helper_template.rb

Instance Method Summary collapse

Methods inherited from Template

#initialize, #parsed_body

Constructor Details

This class inherits a constructor from Template

Instance Method Details

#bodyObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/generators/templates/helpers/pom_helper_template.rb', line 4

def body
  "    module Raider\n      module PomHelper\n        def instance\n          @instance ||= new\n        end\n\n        def method_missing(message, *args, &block)\n          return super unless instance.respond_to?(message)\n\n          instance.public_send(message, *args, &block)\n        end\n\n        def respond_to_missing?(method, *_args, &block)\n          instance.respond_to?(method) || super\n        end\n      end\n    end\n  EOF\nend\n"