Module: AudioDicer
- Defined in:
- lib/audio_dicer.rb,
lib/audio_dicer/runner.rb,
lib/audio_dicer/context.rb,
lib/audio_dicer/version.rb,
lib/audio_dicer/context/album.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .execute(script, filename = nil) ⇒ Object
- .expand_relative_file(file) ⇒ Object
- .load(filename) ⇒ Object
Class Method Details
.execute(script, filename = nil) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/audio_dicer.rb', line 18 def self.execute(script, filename = nil) ctx = Context.new ctx.instance_eval script Runner.new(ctx).run end |
.expand_relative_file(file) ⇒ Object
8 9 10 |
# File 'lib/audio_dicer.rb', line 8 def self.(file) File.(file, Dir.pwd) end |
.load(filename) ⇒ Object
12 13 14 15 16 |
# File 'lib/audio_dicer.rb', line 12 def self.load(filename) File.open((filename)) do |file| execute file.read, filename end end |