Class: Scrapers::NetrcReader
- Inherits:
-
Object
- Object
- Scrapers::NetrcReader
- Defined in:
- lib/netrc_reader.rb
Instance Attribute Summary collapse
-
#pw ⇒ Object
Returns the value of attribute pw.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(section) ⇒ NetrcReader
constructor
A new instance of NetrcReader.
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
#pw ⇒ Object
Returns the value of attribute pw.
5 6 7 |
# File 'lib/netrc_reader.rb', line 5 def pw @pw end |
#user ⇒ Object
Returns the value of attribute user.
5 6 7 |
# File 'lib/netrc_reader.rb', line 5 def user @user end |