Class: GitCheckCI::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/git-check-ci/checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Checker

pass a :dir (defaults to current directory)



15
16
17
18
# File 'lib/git-check-ci/checker.rb', line 15

def initialize(options = {})
  @directory = options[:dir] || Dir.pwd
  @config = Config.new(:dir => @directory)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



12
13
14
# File 'lib/git-check-ci/checker.rb', line 12

def config
  @config
end

Instance Method Details

#check_and_save(hash = nil) ⇒ Object



21
22
23
# File 'lib/git-check-ci/checker.rb', line 21

def check_and_save(hash = nil)
  save(check(hash))
end

#uidObject



25
26
27
# File 'lib/git-check-ci/checker.rb', line 25

def uid
  @config.ci.project
end