Class: KDomain::RailsCodeExtractor::ExtractController

Inherits:
Object
  • Object
show all
Includes:
KLog::Logging
Defined in:
lib/k_domain/rails_code_extractor/extract_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(load_shim) ⇒ ExtractController

Returns a new instance of ExtractController.



12
13
14
15
# File 'lib/k_domain/rails_code_extractor/extract_controller.rb', line 12

def initialize(load_shim)
  @load_shim = load_shim
  @shims_loaded = false
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller.



10
11
12
# File 'lib/k_domain/rails_code_extractor/extract_controller.rb', line 10

def controller
  @controller
end

#shims_loadedObject (readonly)

Returns the value of attribute shims_loaded.



9
10
11
# File 'lib/k_domain/rails_code_extractor/extract_controller.rb', line 9

def shims_loaded
  @shims_loaded
end

Instance Method Details

#extract(file) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/k_domain/rails_code_extractor/extract_controller.rb', line 17

def extract(file)
  load_shims unless shims_loaded

  ActionController.class_info = nil
  # KDomain::RailsCodeExtractor.reset

  load_retry(file, 10, nil)
rescue StandardError => e
  log.exception(e)
end