Class: Prpr::Config::Github
- Inherits:
-
Object
- Object
- Prpr::Config::Github
- Defined in:
- lib/prpr/config/github.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(repository, branch: 'master') ⇒ Github
constructor
A new instance of Github.
- #read(path) ⇒ Object
Constructor Details
#initialize(repository, branch: 'master') ⇒ Github
Returns a new instance of Github.
8 9 10 11 |
# File 'lib/prpr/config/github.rb', line 8 def initialize(repository, branch: 'master') @repository = repository @branch = branch end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
6 7 8 |
# File 'lib/prpr/config/github.rb', line 6 def branch @branch end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
6 7 8 |
# File 'lib/prpr/config/github.rb', line 6 def repository @repository end |
Instance Method Details
#read(path) ⇒ Object
13 14 15 |
# File 'lib/prpr/config/github.rb', line 13 def read(path) decode_content(path).tap { |s| s.force_encoding('utf-8') } end |