Module: Postwave::DisplayHelper

Included in:
BlogBuilder, BlogCreator, PostCreator
Defined in:
lib/postwave/display_helper.rb

Instance Method Summary collapse

Instance Method Details

#output_blog_createdObject



10
11
12
# File 'lib/postwave/display_helper.rb', line 10

def output_blog_created
  puts "New blog set up.".green
end

#output_build_completed(build_time) ⇒ Object



47
48
49
# File 'lib/postwave/display_helper.rb', line 47

def output_build_completed(build_time)
  puts "Built succesfully in #{build_time} seconds.".green
end

#output_buildingObject

build



26
27
28
# File 'lib/postwave/display_helper.rb', line 26

def output_building
  puts "🌊 Building..."
end

#output_creating_blogObject

new



6
7
8
# File 'lib/postwave/display_helper.rb', line 6

def output_creating_blog
  puts "🌊 Creating new blog..."
end

#output_creating_postObject

post



16
17
18
# File 'lib/postwave/display_helper.rb', line 16

def output_creating_post
  puts "🌊 Creating new post..."
end

#output_drafts_skipped(drafts) ⇒ Object



35
36
37
38
39
40
# File 'lib/postwave/display_helper.rb', line 35

def output_drafts_skipped(drafts)
  if drafts.any?
    count = drafts.count
    puts "Skipped #{count} #{simple_pluralizer("draft", count)}."
  end
end

#output_exising_setupObject

errors



53
54
55
# File 'lib/postwave/display_helper.rb', line 53

def output_exising_setup
  puts "A blog already exists in this location.".red
end

#output_general_errorObject



61
62
63
# File 'lib/postwave/display_helper.rb', line 61

def output_general_error
  puts "Something went wrong.".red
end

#output_missing_setupObject



57
58
59
# File 'lib/postwave/display_helper.rb', line 57

def output_missing_setup
  puts "You need to set up a blog first.".red
end

#output_post_created(post_path) ⇒ Object



20
21
22
# File 'lib/postwave/display_helper.rb', line 20

def output_post_created(post_path)
  puts "New post created at: #{post_path}".green
end

#output_post_processed(posts) ⇒ Object



30
31
32
33
# File 'lib/postwave/display_helper.rb', line 30

def output_post_processed(posts)
  count = posts.count
  puts "Processed #{count} #{simple_pluralizer("post", count)}."
end

#output_tags_created(tags) ⇒ Object



42
43
44
45
# File 'lib/postwave/display_helper.rb', line 42

def output_tags_created(tags)
  count = tags.count
  puts "Built tag files for #{count} #{simple_pluralizer("tag", count)}."
end