Class: Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/aavimeodl/AVD.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCredentials

Returns a new instance of Credentials.



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/aavimeodl/AVD.rb', line 46

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.



45
46
47
# File 'lib/aavimeodl/AVD.rb', line 45

def day
  @day
end

#urlObject (readonly)

Returns the value of attribute url.



45
46
47
# File 'lib/aavimeodl/AVD.rb', line 45

def url
  @url
end

#vimeo_passwordObject (readonly)

Returns the value of attribute vimeo_password.



45
46
47
# File 'lib/aavimeodl/AVD.rb', line 45

def vimeo_password
  @vimeo_password
end