Class: Prpr::Config::Github

Inherits:
Object
  • Object
show all
Defined in:
lib/prpr/config/github.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#branchObject (readonly)

Returns the value of attribute branch.



6
7
8
# File 'lib/prpr/config/github.rb', line 6

def branch
  @branch
end

#repositoryObject (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