Class: CiHelper::Functions::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_helper/functions/base.rb

Direct Known Subclasses

Jenkin, PullRequest, Redmine

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
14
15
16
# File 'lib/ci_helper/functions/base.rb', line 9

def initialize(config)
  @user_cli = CiHelper::UserCommandLineInterface.new
  @config = config

  @issue_monitor     = IssueMonitor.new(config.ci_ac, config.ci_pass)
  @bit_bucket_client = BitBucketProcedure.new(config.bit_ac, config.bit_pass)
  @redmine_client = RedmineProcedure.new(config.redmine_ac, config.redmine_pass)
end

Instance Attribute Details

#bit_bucket_clientObject (readonly)

Returns the value of attribute bit_bucket_client.



4
5
6
# File 'lib/ci_helper/functions/base.rb', line 4

def bit_bucket_client
  @bit_bucket_client
end

#configObject (readonly)

Returns the value of attribute config.



4
5
6
# File 'lib/ci_helper/functions/base.rb', line 4

def config
  @config
end

#issue_monitorObject (readonly)

Returns the value of attribute issue_monitor.



4
5
6
# File 'lib/ci_helper/functions/base.rb', line 4

def issue_monitor
  @issue_monitor
end

#redmine_clientObject (readonly)

Returns the value of attribute redmine_client.



4
5
6
# File 'lib/ci_helper/functions/base.rb', line 4

def redmine_client
  @redmine_client
end

#user_cliObject (readonly)

Returns the value of attribute user_cli.



4
5
6
# File 'lib/ci_helper/functions/base.rb', line 4

def user_cli
  @user_cli
end

Instance Method Details

#runObject



18
19
20
# File 'lib/ci_helper/functions/base.rb', line 18

def run
  fail NotImplementedError, 'Please implement your function first'
end