Sha256: 824f29f9f4a37cc45be59369a6f3f04a78904a209d16eada0c7c6c5cbfe6499d
Contents?: true
Size: 374 Bytes
Versions: 2
Compression:
Stored size: 374 Bytes
Contents
module SlideHero class Code include Compilable attr_reader :language, :source, :location 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 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slide_hero-0.0.11 | lib/slide_hero/code.rb |
slide_hero-0.0.10 | lib/slide_hero/code.rb |