Module: Pressy::EmptyPost

Defined in:
lib/pressy/empty_post.rb

Class Method Summary collapse

Class Method Details

.build(options = {}) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/pressy/empty_post.rb', line 2

def self.build(options = {})
  Pressy::Post.new(
    "post_title" => options[:title],
    "post_content" => "\n",
    "post_status" => options.fetch(:status, "draft"),
    "post_format" => options.fetch(:format, "standard"),
  )
end