class EthicalClothing::CLI
Public Instance Methods
call()
click to toggle source
# File lib/ethical_clothing/cli.rb, line 2 def call welcome_and_scrape list_brands menu end
list_brands()
click to toggle source
# File lib/ethical_clothing/cli.rb, line 29 def list_brands brands_sorted = EthicalClothing::Brand.all.sort_by {|brand| brand.name} puts "" puts "---------- Ethical Clothing Brands: ----------" puts "" brands_sorted.each_with_index do |brand, index| puts "#{index + 1}. #{brand.name}" end puts "" end
welcome_and_scrape()
click to toggle source
# File lib/ethical_clothing/cli.rb, line 8 def welcome_and_scrape # puts "---------Welcome to the Ethical Clothing ClI App-----------" puts "A few things to note: " puts "" puts "Ethical fashion (or slow fashion or sustainable fashion) simply means that the retailer is transparent about where they're sourcing their clothes, that they pay fairly, and use materials that are organic, un-harmful, or recycled when possible. " puts "" puts "....one moment, we are collecting your brands..." puts "" EthicalClothing::Scraper.get_and_create_brands puts "" puts ".........." puts "" puts "....." puts "" EthicalClothing::Scraper.match end