Class: Scrapers::NetrcReader

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(section) ⇒ NetrcReader

Returns a new instance of NetrcReader.



7
8
9
10
# File 'lib/netrc_reader.rb', line 7

def initialize(section)
  netrc = Netrc.read
  @user, @pw = netrc[section]      
end

Instance Attribute Details

#pwObject

Returns the value of attribute pw.



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

def pw
  @pw
end

#userObject

Returns the value of attribute user.



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

def user
  @user
end