Class: RailsAdmin::Support::ESModuleProcessor
- Inherits:
-
Object
- Object
- RailsAdmin::Support::ESModuleProcessor
- Defined in:
- lib/rails_admin/support/es_module_processor.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize ⇒ ESModuleProcessor
constructor
A new instance of ESModuleProcessor.
Constructor Details
#initialize ⇒ ESModuleProcessor
Returns a new instance of ESModuleProcessor.
14 |
# File 'lib/rails_admin/support/es_module_processor.rb', line 14 def initialize; end |
Class Method Details
.call(input) ⇒ Object
10 11 12 |
# File 'lib/rails_admin/support/es_module_processor.rb', line 10 def self.call(input) instance.call(input) end |
.instance ⇒ Object
6 7 8 |
# File 'lib/rails_admin/support/es_module_processor.rb', line 6 def self.instance @instance ||= new end |
Instance Method Details
#call(input) ⇒ Object
16 17 18 19 20 |
# File 'lib/rails_admin/support/es_module_processor.rb', line 16 def call(input) return unless input[:name] == 'rails_admin/application' input[:data].gsub(/^((?:import|export) .+)$/) { "// #{Regexp.last_match(1)}" } end |