Class: Slackup::Stars
Constant Summary
Constants inherited from Slackup
Error, RUN_ROOT, SEMAPHORE, VERSION
Instance Attribute Summary
Attributes inherited from Slackup
Instance Method Summary collapse
- #list ⇒ Object (also: #stars)
- #write! ⇒ Object
- #write_stars? ⇒ Boolean
Methods inherited from Slackup
backup, #configure_client, configure_client, #execute, #initialize, run_root, team_config, team_config_file
Constructor Details
This class inherits a constructor from Slackup
Instance Method Details
#list ⇒ Object Also known as: stars
3 4 5 |
# File 'lib/slackup/stars.rb', line 3 def list client.stars_list(count: "1000", page: "1") end |
#write! ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/slackup/stars.rb', line 18 def write! return unless write_stars? "stars", list do || File.open(backup_filename("stars"), "w") do |f| f.write(serialize()) end end end |
#write_stars? ⇒ Boolean
8 9 10 11 12 13 14 15 16 |
# File 'lib/slackup/stars.rb', line 8 def write_stars? if config.fetch("stars", true) p [name, :stars, "Writing"] true else p [name, :stars, "Skipping"] false end end |