Class: XCPretty::NetrcInteractor
- Inherits:
-
Object
- Object
- XCPretty::NetrcInteractor
- Defined in:
- lib/xcpretty/reporters/learn.rb
Instance Attribute Summary collapse
-
#netrc ⇒ Object
readonly
Returns the value of attribute netrc.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ NetrcInteractor
constructor
A new instance of NetrcInteractor.
- #write(username, user_id) ⇒ Object
Constructor Details
#initialize ⇒ NetrcInteractor
Returns a new instance of NetrcInteractor.
125 126 127 128 |
# File 'lib/xcpretty/reporters/learn.rb', line 125 def initialize @netrc = Netrc.read @username, @user_id = netrc["flatiron-push"] end |
Instance Attribute Details
#netrc ⇒ Object (readonly)
Returns the value of attribute netrc.
123 124 125 |
# File 'lib/xcpretty/reporters/learn.rb', line 123 def netrc @netrc end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
123 124 125 |
# File 'lib/xcpretty/reporters/learn.rb', line 123 def user_id @user_id end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
123 124 125 |
# File 'lib/xcpretty/reporters/learn.rb', line 123 def username @username end |
Instance Method Details
#write(username, user_id) ⇒ Object
130 131 132 133 |
# File 'lib/xcpretty/reporters/learn.rb', line 130 def write(username, user_id) netrc["flatiron-push"] = username, user_id netrc.save end |