def file_content_from_hash(input_hash) matter_hash = input_hash.reject { |k, v| k == "content" } matter = matter_hash.map { |k, v| "#{k}: #{v}\n" }.join.chomp content = if input_hash['input'] && input_hash['filter'] "{{ #{input_hash['input']} | #{input_hash['filter']} }}" else input_hash['content'] end <