Class: Jigit::Jigitfile

Inherits:
Object
  • Object
show all
Defined in:
lib/jigit/core/jigitfile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Jigitfile

Returns a new instance of Jigitfile.



13
14
15
16
17
18
19
20
21
# File 'lib/jigit/core/jigitfile.rb', line 13

def initialize(path)
  raise "Path is a required parameter" if path.nil?
  raise "Couldn't find Jigitfile file at '#{path}'" unless File.exist?(path)
  jigitfile = File.read(path)
  yaml_hash = read_data_from_yaml_file(jigitfile, path)
  self.in_progress_status = yaml_hash[JigitfileConstants.in_progress_status]
  self.other_statuses = yaml_hash[JigitfileConstants.other_statuses]
  self.host = yaml_hash[JigitfileConstants.host]
end

Instance Attribute Details

#hostString

Returns JIRA server host.

Returns:

  • (String)

    JIRA server host



11
12
13
# File 'lib/jigit/core/jigitfile.rb', line 11

def host
  @host
end

#in_progress_statusString

Returns The status which represens In Progress state.

Returns:

  • (String)

    The status which represens In Progress state



7
8
9
# File 'lib/jigit/core/jigitfile.rb', line 7

def in_progress_status
  @in_progress_status
end

#other_statusesArray

Returns The other possible statuses.

Returns:

  • (Array)

    The other possible statuses



9
10
11
# File 'lib/jigit/core/jigitfile.rb', line 9

def other_statuses
  @other_statuses
end