Method: Noumenon::ContentRepository::FileSystem#put
- Defined in:
- lib/noumenon/content_repository/file_system.rb
#put(path, content = {}) ⇒ Object
Saves a piece of content to the repsitory.
52 53 54 55 56 57 |
# File 'lib/noumenon/content_repository/file_system.rb', line 52 def put(path, content = {}) create_tree(path) path = File.join(path, "index") if File.exist?(repository_path(path)) write_file "#{path}.yml", content.symbolize_keys.to_yaml end |