Class: SnapCi::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_ci/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, config) ⇒ Project

Returns a new instance of Project.



8
9
10
11
12
13
# File 'lib/snap_ci/project.rb', line 8

def initialize(args, config)
  @owner = args[:owner]
  @repository = args[:repository]
  @branches = args[:branches]
  @http = Http.new(config)
end

Instance Attribute Details

#branchesObject (readonly)

Returns the value of attribute branches.



6
7
8
# File 'lib/snap_ci/project.rb', line 6

def branches
  @branches
end

#ownerObject (readonly)

Returns the value of attribute owner.



6
7
8
# File 'lib/snap_ci/project.rb', line 6

def owner
  @owner
end

#repositoryObject (readonly)

Returns the value of attribute repository.



6
7
8
# File 'lib/snap_ci/project.rb', line 6

def repository
  @repository
end

Instance Method Details

#to_messageObject



15
16
17
# File 'lib/snap_ci/project.rb', line 15

def to_message
  "Project: #{owner}/#{repository}:\n" + pipelines_to_s
end