class Classifile::Classify
Classify
files by DSL
Attributes
file[R]
to_path[R]
Public Instance Methods
run(target_file, to_path, &block)
click to toggle source
# File lib/classifile/classify.rb, line 10 def run(target_file, to_path, &block) raise "TypeError" unless target_file.is_a?(TargetFile) state = State.new(target_file) state.to_path = to_path state.save_name = target_file.basename begin state.instance_exec(state.file, &block) rescue Failed # Ignored end state.gotcha end