Module: ActiveRecord::Acts::ShellscriptExecutable::ClassMethods

Defined in:
lib/acts_as_shellscript_executable/active_record/acts/shellscript_executable.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_shellscript_executable(options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/acts_as_shellscript_executable/active_record/acts/shellscript_executable.rb', line 9

def acts_as_shellscript_executable(options = {})
  @@configuration = { script: :script, stdout: nil }
  @@configuration.update(options) if options.is_a?(Hash)

  class_eval <<-EOV
    include ::ActiveRecord::Acts::ShellscriptExecutable::InstanceMethods

  EOV
end

#configurationObject



19
20
21
# File 'lib/acts_as_shellscript_executable/active_record/acts/shellscript_executable.rb', line 19

def configuration
  @@configuration
end