class SlideHero::Code

Attributes

language[R]
location[R]
source[R]

Public Class Methods

new(language, code_path=Dir.pwd, &code_file) click to toggle source
# File lib/slide_hero/code.rb, line 5
def initialize(language, code_path=Dir.pwd, &code_file)
  @language = language
  @location = "#{code_path}/code/#{code_file.call}"
  @source = File.read(location)
rescue Errno::ENOENT
  abort "#{Dir.pwd}/#{code_file.call} not found"
end