Class: CrudInspector::Tracker

Inherits:
Object
  • Object
show all
Defined in:
lib/crud_inspector.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Tracker

Returns a new instance of Tracker.



12
13
14
# File 'lib/crud_inspector.rb', line 12

def initialize(options = {})
  @options = options
end

Instance Method Details

#trackObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/crud_inspector.rb', line 16

def track
  return unless ::Rails.env.development?
  case @options[:type]
  when :rest
    ::CrudInspector::Files::Manager.new(@options.merge!(type: :rest)).perform
  when :soap
    ::CrudInspector::Files::Manager.new(@options.merge!(type: :soap)).perform
  else
    "no type given"
  end
end