Class: Ayadn::Status

Inherits:
Object show all
Defined in:
lib/ayadn/status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(thor = Thor::Shell::Color.new) ⇒ Status

Returns a new instance of Status.



7
8
9
# File 'lib/ayadn/status.rb', line 7

def initialize thor = Thor::Shell::Color.new
  @thor = thor
end

Instance Attribute Details

#thorObject (readonly)

Returns the value of attribute thor.



5
6
7
# File 'lib/ayadn/status.rb', line 5

def thor
  @thor
end

Instance Method Details



86
87
88
# File 'lib/ayadn/status.rb', line 86

def all_hashtag_links hashtag
  info("info", "links from posts containing hashtag '##{hashtag}':", "cyan")
end


90
91
92
# File 'lib/ayadn/status.rb', line 90

def all_search_links words
  info("info", "links from posts containing word(s) '#{words}':", "cyan")
end


94
95
96
# File 'lib/ayadn/status.rb', line 94

def all_stars_links
  info("info", "links from your starred posts:", "cyan")
end

#already_repostedObject



174
175
176
# File 'lib/ayadn/status.rb', line 174

def already_reposted
  info("ok", "already reposted", "green")
end

#already_starredObject



170
171
172
# File 'lib/ayadn/status.rb', line 170

def already_starred
  info("ok", "already starred", "green")
end

#ask_clear_blacklistObject



511
512
513
# File 'lib/ayadn/status.rb', line 511

def ask_clear_blacklist
  info("question", "are you sure you want to erase all the content of your blacklist database? [y/N]", "red")
end

#ask_clear_bookmarksObject



515
516
517
# File 'lib/ayadn/status.rb', line 515

def ask_clear_bookmarks
  info("question", "are you sure you want to erase all the content of your bookmarks database? [y/N]", "red")
end

#ask_clear_databasesObject



507
508
509
# File 'lib/ayadn/status.rb', line 507

def ask_clear_databases
  info("question", "are you sure you want to erase all the content of your aliases database? [y/N]", "red")
end

#autoObject



357
358
359
360
361
362
363
364
# File 'lib/ayadn/status.rb', line 357

def auto
  say do
    say_info "entering the auto posting mode"
    say_info "each line you type (each time you hit ENTER) is automatically posted to ADN"
    say_info "at any moment, starting now, hit CTRL+C to exit"
    say_yellow :info, "AUTO POSTING MODE ACTIVATED"
  end
end

#ayadnObject



488
489
490
491
492
493
494
495
496
497
498
# File 'lib/ayadn/status.rb', line 488

def ayadn
  "\n\\t\\t     _____ __ __ _____ ____  _____\n\\t\\t    |  _  |  |  |  _  |    \\\\|   | |\n\\t\\t    |     |_   _|     |  |  | | | |\n\\t\\t    |__|__| |_| |__|__|____/|_|___|\n\n\n"
end

#bad_pathObject



414
415
416
# File 'lib/ayadn/status.rb', line 414

def bad_path
  info("error", "couldn't upload this file (path seems wrong)", "red")
end

#blocked(username) ⇒ Object



198
199
200
# File 'lib/ayadn/status.rb', line 198

def blocked(username)
  info("blocked", username, "green")
end

#blocking(username) ⇒ Object



66
67
68
# File 'lib/ayadn/status.rb', line 66

def blocking(username)
  say_yellow :blocking, username
end

#canceledObject



15
16
17
18
19
20
# File 'lib/ayadn/status.rb', line 15

def canceled
  say do
    puts "\n"
    say_red :canceled, ""
  end
end

#deleted(post_id) ⇒ Object



146
147
148
# File 'lib/ayadn/status.rb', line 146

def deleted(post_id)
  info("deleted", "post #{post_id}", "green")
end

#deleted_m(message_id) ⇒ Object



150
151
152
# File 'lib/ayadn/status.rb', line 150

def deleted_m(message_id)
  info("deleted", "message #{message_id}", "green")
end

#deleting_message(message_id) ⇒ Object



42
43
44
# File 'lib/ayadn/status.rb', line 42

def deleting_message(message_id)
  say_yellow :deleting, "message #{message_id}"
end

#deleting_post(post_id) ⇒ Object



38
39
40
# File 'lib/ayadn/status.rb', line 38

def deleting_post(post_id)
  say_yellow :deleting, "post #{post_id}"
end

#deprecated_ayadnObject



455
456
457
458
459
460
# File 'lib/ayadn/status.rb', line 455

def deprecated_ayadn
  say do
    say_red :deprecated, "Ayadn 1.x user data detected"
    say_yellow :warning,  "please delete your old ayadn folder then try again"
  end
end

#doneObject



11
12
13
# File 'lib/ayadn/status.rb', line 11

def done
  info("done", "", "green")
end

#downloaded(name) ⇒ Object



22
23
24
# File 'lib/ayadn/status.rb', line 22

def downloaded(name)
  info("downloaded", "#{Settings.config.paths.downloads}/#{name}", "green")
end

#downloadingObject



30
31
32
# File 'lib/ayadn/status.rb', line 30

def downloading
  info("connected", "downloading from ADN", "yellow")
end

#empty_fieldsObject



319
320
321
# File 'lib/ayadn/status.rb', line 319

def empty_fields
  info("canceled", "couldn't get enough information (empty field)", "red")
end

#empty_listObject



225
226
227
# File 'lib/ayadn/status.rb', line 225

def empty_list
  info("info", "the list is empty", "yellow")
end

#error_missing_channel_idObject



214
215
216
# File 'lib/ayadn/status.rb', line 214

def error_missing_channel_id
  info("error", "please specify a channel id", "red")
end

#error_missing_message_idObject



210
211
212
# File 'lib/ayadn/status.rb', line 210

def error_missing_message_id
  info("error", "please specify a message id", "red")
end

#error_missing_parametersObject



218
219
220
221
222
223
# File 'lib/ayadn/status.rb', line 218

def error_missing_parameters
  say do
    say_error "please submit valid items"
    say_info "see `ayadn -sg` for a list of valid parameters and values"
  end
end

#error_missing_post_idObject



206
207
208
# File 'lib/ayadn/status.rb', line 206

def error_missing_post_id
  info("error", "please specify a post id", "red")
end

#error_missing_usernameObject



202
203
204
# File 'lib/ayadn/status.rb', line 202

def error_missing_username
  info("error", "please specify a username", "red")
end

#error_only_osxObject



312
313
314
315
316
317
# File 'lib/ayadn/status.rb', line 312

def error_only_osx
  say do
    say_error "this feature only works with iTunes by default"
    say_info "if you've got a Last.fm account, use `ayadn -NP --lastfm` (short: `-l`)"
  end
end

#fetching_from(source) ⇒ Object



429
430
431
# File 'lib/ayadn/status.rb', line 429

def fetching_from(source)
  info("connexion", "fetching informations from #{source}", "green")
end

#followed(username) ⇒ Object



182
183
184
# File 'lib/ayadn/status.rb', line 182

def followed(username)
  info("followed", username, "green")
end

#following(username) ⇒ Object



50
51
52
# File 'lib/ayadn/status.rb', line 50

def following(username)
  say_yellow :following, username
end

#info(status, message, color = nil) ⇒ Object




544
545
546
547
548
549
550
551
552
553
# File 'lib/ayadn/status.rb', line 544

def info(status, message, color = nil)
  if color.nil?
    lamb = lambda { say_nocolor(status.to_sym, message.to_s) }
  else
    lamb = lambda { @thor.say_status(status.to_sym, message.to_s, color.to_sym) }
  end
  puts "\n"
  lamb.call
  puts "\n"
end

#itunes_storeObject



425
426
427
# File 'lib/ayadn/status.rb', line 425

def itunes_store
  info("connexion", "fetching informations from the iTunes Store", "green")
end

#itunes_store_track(store) ⇒ Object



523
524
525
526
# File 'lib/ayadn/status.rb', line 523

def itunes_store_track(store)
  puts "\n"
  say_cyan :next, "Ayadn will use these elements to insert album artwork and a link"
end


26
27
28
# File 'lib/ayadn/status.rb', line 26

def links_saved(name)
  info("done", "links exported to file #{Settings.config.paths.lists}/#{name}", "green")
end

#messageObject



271
272
273
# File 'lib/ayadn/status.rb', line 271

def message
  say_cyan :max, "#{Settings.config.message_max_length} characters"
end

#message_from(username) ⇒ Object



244
245
246
247
248
# File 'lib/ayadn/status.rb', line 244

def message_from(username)
  puts "\n"
  say_yellow :from, "#{Settings.config.identity.handle}"
  say_yellow :to, "#{username[0]}"
end

#must_be_in_indexObject



373
374
375
# File 'lib/ayadn/status.rb', line 373

def must_be_in_index
  info("error", "number must be in the range of the indexed posts", "red")
end

#must_be_integerObject



280
281
282
# File 'lib/ayadn/status.rb', line 280

def must_be_integer
  info("error", "this paramater must be an integer between 1 and 200", "red")
end

#muted(username) ⇒ Object



190
191
192
# File 'lib/ayadn/status.rb', line 190

def muted(username)
  info("muted", username, "green")
end

#muting(username) ⇒ Object



58
59
60
# File 'lib/ayadn/status.rb', line 58

def muting(username)
  say_yellow :muting, username
end

#no_aliasObject



385
386
387
# File 'lib/ayadn/status.rb', line 385

def no_alias
  info("error", "this alias doesn't exist", "red")
end

#no_curlObject



418
419
420
421
422
423
# File 'lib/ayadn/status.rb', line 418

def no_curl
  say do
    say_error "Ayadn needs 'curl' to upload files"
    say_yellow :next, "please install 'curl' (or check that it's properly declared in your $PATH)"
  end
end

#no_force(target) ⇒ Object



433
434
435
436
437
438
# File 'lib/ayadn/status.rb', line 433

def no_force(target)
  say do
    say_error "'#{target}' can't be displayed (could be muted, blocked, in the Blacklist, etc)"
    say_info "please use option '--force' ('-f') to try and display this content anyway"
  end
end

#no_itunesObject



389
390
391
# File 'lib/ayadn/status.rb', line 389

def no_itunes
  info("canceled", "unable to get info from iTunes", "red")
end

#no_new_messagesObject



288
289
290
# File 'lib/ayadn/status.rb', line 288

def no_new_messages
  info("info", "no new messages", "cyan")
end

#no_new_postsObject



284
285
286
# File 'lib/ayadn/status.rb', line 284

def no_new_posts
  info("info", "no new posts since your last visit with Ayadn", "cyan")
end

#no_pin_credsObject



300
301
302
# File 'lib/ayadn/status.rb', line 300

def no_pin_creds
  info("error", "Ayadn couldn't find your Pinboard credentials", "red")
end

#no_textObject



410
411
412
# File 'lib/ayadn/status.rb', line 410

def no_text
  info("error", "no text", "red")
end

#no_usernameObject



448
449
450
451
452
453
# File 'lib/ayadn/status.rb', line 448

def no_username
  say do
    say_error "Ayadn couldn't get your username"
    say_yellow :next, "please try again"
  end
end

#nobody_repostedObject



341
342
343
# File 'lib/ayadn/status.rb', line 341

def nobody_reposted
  info("error", "nobody reposted this post", "red")
end

#nobody_starredObject



345
346
347
# File 'lib/ayadn/status.rb', line 345

def nobody_starred
  info("error", "nobody starred this post", "red")
end

#not_authorizedObject



323
324
325
326
327
328
# File 'lib/ayadn/status.rb', line 323

def not_authorized
  say do
    say_error "no user authorized"
    say_info "please run `ayadn -auth` to authorize an account"
  end
end

#not_blocked(username) ⇒ Object



142
143
144
# File 'lib/ayadn/status.rb', line 142

def not_blocked(username)
  info("error", "could not block user #{username} (doesn't exist, or is already blocked)", "red")
end

#not_deleted(post_id) ⇒ Object



98
99
100
# File 'lib/ayadn/status.rb', line 98

def not_deleted(post_id)
  info("error", "could not delete post #{post_id} (post isn't yours, or is already deleted)", "red")
end

#not_deleted_m(post_id) ⇒ Object



102
103
104
# File 'lib/ayadn/status.rb', line 102

def not_deleted_m(post_id)
  info("error", "could not delete post #{post_id} (post isn't yours, or is already deleted)", "red")
end

#not_followed(username) ⇒ Object



126
127
128
# File 'lib/ayadn/status.rb', line 126

def not_followed(username)
  info("error", "could not follow user #{username} (doesn't exist, or you already follow)", "red")
end

#not_muted(username) ⇒ Object



134
135
136
# File 'lib/ayadn/status.rb', line 134

def not_muted(username)
  info("error", "could not mute user #{username} (doesn't exist, or is already muted)", "red")
end

#not_reposted(post_id) ⇒ Object



114
115
116
# File 'lib/ayadn/status.rb', line 114

def not_reposted(post_id)
  info("error", "could not repost post #{post_id} (post has been deleted?)", "red")
end

#not_starred(post_id) ⇒ Object



106
107
108
# File 'lib/ayadn/status.rb', line 106

def not_starred(post_id)
  info("error", "could not star post #{post_id} (post doesn't exist, or is already starred)", "red")
end

#not_unblocked(username) ⇒ Object



138
139
140
# File 'lib/ayadn/status.rb', line 138

def not_unblocked(username)
  info("error", "could not unblock user #{username} (doesn't exist, or wasn't already blocked)", "red")
end

#not_unfollowed(username) ⇒ Object



122
123
124
# File 'lib/ayadn/status.rb', line 122

def not_unfollowed(username)
  info("error", "could not unfollow user #{username} (doesn't exist, or wasn't already followed)", "red")
end

#not_unmuted(username) ⇒ Object



130
131
132
# File 'lib/ayadn/status.rb', line 130

def not_unmuted(username)
  info("error", "could not unmute user #{username} (doesn't exist, or wasn't already muted)", "red")
end

#not_unreposted(post_id) ⇒ Object



110
111
112
# File 'lib/ayadn/status.rb', line 110

def not_unreposted(post_id)
  info("error", "could not unrepost post #{post_id} (post isn't yours, isn't a repost, or has been deleted)", "red")
end

#not_unstarred(post_id) ⇒ Object



118
119
120
# File 'lib/ayadn/status.rb', line 118

def not_unstarred(post_id)
  info("error", "could not unstar post #{post_id} (post isn't yours, isn't starred, or has been deleted)", "red")
end

#not_your_repostObject



349
350
351
# File 'lib/ayadn/status.rb', line 349

def not_your_repost
  info("error", "this post isn't one of your reposts", "red")
end

#not_your_starredObject



353
354
355
# File 'lib/ayadn/status.rb', line 353

def not_your_starred
  info("error", "this isn't one of your starred posts", "red")
end

#ok?Boolean

Returns:

  • (Boolean)


519
520
521
# File 'lib/ayadn/status.rb', line 519

def ok?
  info("confirm", "is it ok? [y/N]", "yellow")
end

#one_usernameObject



444
445
446
# File 'lib/ayadn/status.rb', line 444

def one_username
  info("error", "please specify only one username", "red")
end

#pin_creds_savedObject



304
305
306
# File 'lib/ayadn/status.rb', line 304

def pin_creds_saved
  info("done", "credentials successfully encoded and saved", "green")
end

#pin_passwordObject



397
398
399
# File 'lib/ayadn/status.rb', line 397

def pin_password
  info("please", "enter your Pinboard password (invisible, CTRL+C to cancel)", "green")
end

#pin_usernameObject



393
394
395
# File 'lib/ayadn/status.rb', line 393

def pin_username
  info("please", "enter your Pinboard username (CTRL+C to cancel)", "green")
end

#postObject



267
268
269
# File 'lib/ayadn/status.rb', line 267

def post
  say_cyan :max, "#{Settings.config.post_max_length} characters"
end

#post_404(post_id) ⇒ Object



381
382
383
# File 'lib/ayadn/status.rb', line 381

def post_404(post_id)
  info("error", "impossible to find #{post_id} (it may have been deleted)", "red")
end

#post_infoObject



475
476
477
# File 'lib/ayadn/status.rb', line 475

def 
  info("info", "post", "cyan")
end

#postingObject



34
35
36
# File 'lib/ayadn/status.rb', line 34

def posting
  info("connected", "posting to ADN", "yellow")
end

#profile_optionsObject



440
441
442
# File 'lib/ayadn/status.rb', line 440

def profile_options
  info("error", "please specify what to update or delete: --bio, --name, --blog, --twitter or --web", "red")
end

#readlineObject



255
256
257
258
259
260
261
# File 'lib/ayadn/status.rb', line 255

def readline
  say do
    say_cyan :next, "type your text"
    say_cyan :ok, "[CTRL+D] to validate"
    say_cyan :cancel, "[CTRL+C] to cancel"
  end
end

#redirectingObject



334
335
336
337
338
339
# File 'lib/ayadn/status.rb', line 334

def redirecting
  say do
    say_info "post is a repost"
    say_yellow :action, "redirecting"
  end
end

#replyObject



263
264
265
# File 'lib/ayadn/status.rb', line 263

def reply
  say_cyan :max, "#{Settings.config.post_max_length} characters"
end

#replying_to(post_id) ⇒ Object



250
251
252
253
# File 'lib/ayadn/status.rb', line 250

def replying_to(post_id)
  puts "\n"
  say_yellow :replying, "to post #{post_id}"
end

#repost_infoObject



479
480
481
# File 'lib/ayadn/status.rb', line 479

def repost_info
  info("info", "repost of", "cyan")
end

#reposted(post_id) ⇒ Object



162
163
164
# File 'lib/ayadn/status.rb', line 162

def reposted(post_id)
  info("reposted", "post #{post_id}", "green")
end

#reposting(post_id) ⇒ Object



74
75
76
# File 'lib/ayadn/status.rb', line 74

def reposting(post_id)
  say_yellow :reposting, "post #{post_id}"
end

#saving_pinObject



308
309
310
# File 'lib/ayadn/status.rb', line 308

def saving_pin
  info("saving", "post text and links to Pinboard", "yellow")
end

#sayObject

expects a block



555
556
557
558
559
# File 'lib/ayadn/status.rb', line 555

def say() # expects a block
  puts "\n"
  yield
  puts "\n"
end

#say_blue(tag, message) ⇒ Object



581
582
583
# File 'lib/ayadn/status.rb', line 581

def say_blue(tag, message)
  @thor.say_status tag, message, :blue
end

#say_center(message) ⇒ Object



561
562
563
# File 'lib/ayadn/status.rb', line 561

def say_center(message)
  @thor.say_status nil, message
end

#say_cyan(tag, message) ⇒ Object



585
586
587
# File 'lib/ayadn/status.rb', line 585

def say_cyan(tag, message)
  @thor.say_status tag, message, :cyan
end

#say_endObject



597
598
599
# File 'lib/ayadn/status.rb', line 597

def say_end
  say { say_green :done, "end of diagnostics" }
end

#say_error(message) ⇒ Object



569
570
571
# File 'lib/ayadn/status.rb', line 569

def say_error(message)
  @thor.say_status :error, message, :red
end

#say_green(tag, message) ⇒ Object



577
578
579
# File 'lib/ayadn/status.rb', line 577

def say_green(tag, message)
  @thor.say_status tag, message, :green
end

#say_header(message) ⇒ Object



601
602
603
# File 'lib/ayadn/status.rb', line 601

def say_header(message)
  say { say_info message }
end

#say_info(message) ⇒ Object



573
574
575
# File 'lib/ayadn/status.rb', line 573

def say_info(message)
  @thor.say_status :info, message, :cyan
end

#say_nocolor(tag, message) ⇒ Object



565
566
567
# File 'lib/ayadn/status.rb', line 565

def say_nocolor(tag, message)
  @thor.say_status tag, message
end

#say_red(tag, message) ⇒ Object



589
590
591
# File 'lib/ayadn/status.rb', line 589

def say_red(tag, message)
  @thor.say_status tag, message, :red
end

#say_text(text) ⇒ Object



605
606
607
# File 'lib/ayadn/status.rb', line 605

def say_text(text)
  say { puts text }
end

#say_trace(message) ⇒ Object



609
610
611
# File 'lib/ayadn/status.rb', line 609

def say_trace(message)
  @thor.say_status :message, message, :yell
end

#say_yellow(tag, message) ⇒ Object



593
594
595
# File 'lib/ayadn/status.rb', line 593

def say_yellow(tag, message)
  @thor.say_status tag, message, :yellow
end

#server_error(bool) ⇒ Object



528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/ayadn/status.rb', line 528

def server_error(bool)
  if bool
    say do
      say_error "Ayadn couldn't get the JSON reponse"
      say_yellow :next, "trying again in 10 seconds"
    end
  else
    say do
      say_error "Ayadn couldn't get the JSON reponse"
      say_yellow :status, "Current command canceled after one retry"
    end
  end
end

#starred(post_id) ⇒ Object



154
155
156
# File 'lib/ayadn/status.rb', line 154

def starred(post_id)
  info("starred", "post #{post_id}", "green")
end

#starring(post_id) ⇒ Object



82
83
84
# File 'lib/ayadn/status.rb', line 82

def starring(post_id)
  say_yellow :starring, "post #{post_id}"
end

#thresholdObject



366
367
368
369
370
371
# File 'lib/ayadn/status.rb', line 366

def threshold
  say do
    say_error "please enter a value between 0.1 and 3.5"
    say_green :info, "example: 2.1"
  end
end

#to_be_postedObject



466
467
468
# File 'lib/ayadn/status.rb', line 466

def to_be_posted
  info("", "Your post:")
end

#too_long(size, max_size) ⇒ Object



401
402
403
404
405
406
407
408
# File 'lib/ayadn/status.rb', line 401

def too_long(size, max_size)
  diff = size - max_size
  diff > 1 ? pl = "s" : pl = ""
  say do
    say_error "text too long"
    say_green :info, "#{max_size} max: #{diff} character#{pl} to remove"
  end
end

#type_and_target_missingObject



292
293
294
# File 'lib/ayadn/status.rb', line 292

def type_and_target_missing
  info("error", "please submit a TYPE ('mention', 'hashtag', 'client') and a TARGET (a @username, a hashtag, a client name)", "red")
end

#unblocked(username) ⇒ Object



194
195
196
# File 'lib/ayadn/status.rb', line 194

def unblocked(username)
  info("unblocked", username, "green")
end

#unblocking(username) ⇒ Object



62
63
64
# File 'lib/ayadn/status.rb', line 62

def unblocking(username)
  say_yellow :unblocking, username
end

#unfollowed(username) ⇒ Object



178
179
180
# File 'lib/ayadn/status.rb', line 178

def unfollowed(username)
  info("unfollowed", username, "green")
end

#unfollowing(username) ⇒ Object



46
47
48
# File 'lib/ayadn/status.rb', line 46

def unfollowing(username)
  say_yellow :unfollowing, username
end

#unmuted(username) ⇒ Object



186
187
188
# File 'lib/ayadn/status.rb', line 186

def unmuted(username)
  info("unmuted", username, "green")
end

#unmuting(username) ⇒ Object



54
55
56
# File 'lib/ayadn/status.rb', line 54

def unmuting(username)
  say_yellow :unmuting, username
end

#unread_from_channel(channel_id) ⇒ Object



483
484
485
486
# File 'lib/ayadn/status.rb', line 483

def unread_from_channel(channel_id)
  say_info "unread message(s) from channel #{channel_id}"
  puts "\n\n"
end

#unreposted(post_id) ⇒ Object



158
159
160
# File 'lib/ayadn/status.rb', line 158

def unreposted(post_id)
  info("unreposted", "post #{post_id}", "green")
end

#unreposting(post_id) ⇒ Object



70
71
72
# File 'lib/ayadn/status.rb', line 70

def unreposting(post_id)
  say_yellow :unreposting, "post #{post_id}"
end

#unstarred(post_id) ⇒ Object



166
167
168
# File 'lib/ayadn/status.rb', line 166

def unstarred(post_id)
  info("unstarred", "post #{post_id}", "green")
end

#unstarring(post_id) ⇒ Object



78
79
80
# File 'lib/ayadn/status.rb', line 78

def unstarring(post_id)
  say_yellow :unstarring, "post #{post_id}"
end

#updating_profileObject



462
463
464
# File 'lib/ayadn/status.rb', line 462

def updating_profile
  info("updating", "profile", "yellow")
end

#user_404(username) ⇒ Object



377
378
379
# File 'lib/ayadn/status.rb', line 377

def user_404(username)
  info("error", "user #{username} doesn't exist (it could be a deleted account)", "red")
end

#valid_colors(colors_list) ⇒ Object



275
276
277
278
# File 'lib/ayadn/status.rb', line 275

def valid_colors(colors_list)
  say_cyan :info, "valid colors:"
  say { puts colors_list }
end

#versionObject



499
500
501
502
503
504
505
# File 'lib/ayadn/status.rb', line 499

def version
  puts ayadn()
  say_green :version, "#{VERSION}"
  say_yellow :changelog, "https://github.com/ericdke/na/blob/master/CHANGELOG.md"
  say_yellow :docs, "https://github.com/ericdke/na/tree/master/doc"
  puts "\n\n"
end

#writingObject



229
230
231
232
233
# File 'lib/ayadn/status.rb', line 229

def writing
  puts "\n"
  say_cyan :author, "#{Settings.config.identity.handle}"
  puts "\n"
end

#wrong_argumentsObject



296
297
298
# File 'lib/ayadn/status.rb', line 296

def wrong_arguments
  info("error", "invalid arguments", "red")
end

#wtfObject



330
331
332
# File 'lib/ayadn/status.rb', line 330

def wtf
  info("error", "an unkown error happened", "red")
end

#yourmessage(username = nil) ⇒ Object



235
236
237
238
239
240
241
242
# File 'lib/ayadn/status.rb', line 235

def yourmessage username = nil
    if username.nil?
      say_center "Your message:"
    else
      say_center "Your message to #{username}:"
    end
    puts "\n\n"
end

#yourpostObject



470
471
472
473
# File 'lib/ayadn/status.rb', line 470

def yourpost
  # info("", "Your post:")
  say_center "Your post:"
end