Module: RailsAssist::Artifact::CRUD::Read

Defined in:
lib/rails_artifactor/base/crud/read.rb

Instance Method Summary collapse

Instance Method Details

#read_artifact(name, options = {}, &block) ⇒ Object

TODO: Support :before and :after hash options!



6
7
8
9
10
11
# File 'lib/rails_artifactor/base/crud/read.rb', line 6

def read_artifact(name, options = {}, &block)
  type = get_type(options)
  file_name = existing_file_name(name, type)
  debug "reading from: #{file_name}"
  File.read_from file_name, options, &block
end