Class: Qas::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/qas/info.rb

Overview

Project Information

Constant Summary collapse

ROOT =
Pathname.new(File.join(Dir.home, 'Projects'))

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, branch, url, language) ⇒ Info

Returns a new instance of Info.



22
23
24
25
26
27
# File 'lib/qas/info.rb', line 22

def initialize(name, branch, url, language)
  @name = name
  @branch = branch
  @url = url
  @folder = ROOT.join(language, name)
end

Instance Attribute Details

#branchObject (readonly)

project git branch



14
15
16
# File 'lib/qas/info.rb', line 14

def branch
  @branch
end

#folderObject (readonly)

project folder



20
21
22
# File 'lib/qas/info.rb', line 20

def folder
  @folder
end

#nameObject (readonly)

project name



11
12
13
# File 'lib/qas/info.rb', line 11

def name
  @name
end

#urlObject (readonly)

project uri



17
18
19
# File 'lib/qas/info.rb', line 17

def url
  @url
end

Instance Method Details

#to_sObject



29
30
31
32
33
# File 'lib/qas/info.rb', line 29

def to_s
  <<~INFO
    #{name}
  INFO
end