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.



5
6
7
# File 'lib/crud_inspector.rb', line 5

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

Instance Method Details

#track ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/crud_inspector.rb', line 9

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