Class: GithubTV

Inherits:
Object
  • Object
show all
Defined in:
lib/github-tv.rb

Defined Under Namespace

Classes: Sync

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ GithubTV

Returns a new instance of GithubTV.



7
8
9
10
11
# File 'lib/github-tv.rb', line 7

def initialize(config)
  @token = config.fetch 'token'
  @repos = config.fetch 'repos'
  @org   = config.fetch 'organization'
end

Instance Attribute Details

#orgObject (readonly)

Returns the value of attribute org.



5
6
7
# File 'lib/github-tv.rb', line 5

def org
  @org
end

#reposObject (readonly)

Returns the value of attribute repos.



5
6
7
# File 'lib/github-tv.rb', line 5

def repos
  @repos
end

#tokenObject (readonly)

Returns the value of attribute token.



5
6
7
# File 'lib/github-tv.rb', line 5

def token
  @token
end

Instance Method Details

#runObject



13
14
15
16
17
# File 'lib/github-tv.rb', line 13

def run
  repos.each do |repo|
    Sync.new(client, org, repo).run
  end
end