Class: RunningStation::Runner

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/running_station/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



7
8
9
# File 'app/models/running_station/runner.rb', line 7

def name
  @name
end

Instance Method Details

#codeObject



17
18
19
# File 'app/models/running_station/runner.rb', line 17

def code
  File.read(Rails.root + "app/runners/#{script_name}")
end

#full_pathObject



13
14
15
# File 'app/models/running_station/runner.rb', line 13

def full_path
  Rails.root + "app/runners/#{script_name}"
end

#script_nameObject



9
10
11
# File 'app/models/running_station/runner.rb', line 9

def script_name
  "#{name}.rb"
end