Class: Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/aa-vimeo-downloader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCredentials

Returns a new instance of Credentials.



76
77
78
79
80
81
82
83
84
85
86
# File 'lib/aa-vimeo-downloader.rb', line 76

def initialize
  @day = ARGV.find { |a| a =~ /w\d+d\d+|all/i }
  @url = ARGV.find { |a| a =~ /raw.githubusercontent/ }

  abort("Must provide a URL to a README.md RAW") unless @url
  abort("Must provide a day like 'w4d1' OR '--all'") unless @day

  @day = @day.upcase
  @vimeo_password = get_vimeo_password
  p ''
end

Instance Attribute Details

#dayObject (readonly)

Returns the value of attribute day.



75
76
77
# File 'lib/aa-vimeo-downloader.rb', line 75

def day
  @day
end

#urlObject (readonly)

Returns the value of attribute url.



75
76
77
# File 'lib/aa-vimeo-downloader.rb', line 75

def url
  @url
end

#vimeo_passwordObject (readonly)

Returns the value of attribute vimeo_password.



75
76
77
# File 'lib/aa-vimeo-downloader.rb', line 75

def vimeo_password
  @vimeo_password
end