Class: Sycsvpro::Profiler

Inherits:
Object
  • Object
show all
Includes:
Dsl
Defined in:
lib/sycsvpro/profiler.rb

Overview

A profiler takes a Ruby script and executes the provided method in the script

Constant Summary

Constants included from Dsl

Dsl::COMMA_SPLITTER_REGEX

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Dsl

#clean_up, #params, #rows, #split_by_comma_regex, #str2utf8, #unstring, #write_to

Constructor Details

#initialize(pro_file) ⇒ Profiler

Creates a new profiler



15
16
17
# File 'lib/sycsvpro/profiler.rb', line 15

def initialize(pro_file)
  require pro_file
end

Instance Attribute Details

#pro_fileObject (readonly)

Ruby script file



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

def pro_file
  @pro_file
end

Instance Method Details

#execute(method) ⇒ Object

Executes the provided method in the Ruby script



20
21
22
# File 'lib/sycsvpro/profiler.rb', line 20

def execute(method)
  send(method)
end