Sha256: 7989a4e77601e79e18f888a5654b5ba1f3a37d07316b540b4506e9352f9213a4
Contents?: true
Size: 491 Bytes
Versions: 3
Compression:
Stored size: 491 Bytes
Contents
module Rails::Assist module BaseHelper # READ def read_artifact(name, options, &block) type = get_type(options) file_name = existing_file_name(name, type) debug "reading from: #{file_name}" begin file = File.new(file_name) content = file.read debug "read content: #{content}" yield content if block content rescue raise "Rails #{type} at: #{file_name} can't be read" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails3_assist-0.2.4 | lib/rails3_assist/base/read.rb |
rails3_assist-0.2.3 | lib/rails3_assist/base/read.rb |
rails3_assist-0.2.2 | lib/rails3_assist/base/read.rb |