Class: Teapot::Project

Inherits:
Definition show all
Defined in:
lib/teapot/project.rb

Defined Under Namespace

Classes: Author

Instance Attribute Summary collapse

Attributes inherited from Definition

#context, #description, #name, #package

Instance Method Summary collapse

Methods inherited from Definition

#path, #to_s

Constructor Details

#initialize(context, package, name) ⇒ Project

Returns a new instance of Project.



27
28
29
30
31
32
# File 'lib/teapot/project.rb', line 27

def initialize(context, package, name)
	super context, package, name
	
	@version = "0.0.0"
	@authors = []
end

Instance Attribute Details

#authorsObject (readonly)

Returns the value of attribute authors.



39
40
41
# File 'lib/teapot/project.rb', line 39

def authors
  @authors
end

#licenseObject

Returns the value of attribute license.



35
36
37
# File 'lib/teapot/project.rb', line 35

def license
  @license
end

#summaryObject

Returns the value of attribute summary.



34
35
36
# File 'lib/teapot/project.rb', line 34

def summary
  @summary
end

#versionObject

Returns the value of attribute version.



37
38
39
# File 'lib/teapot/project.rb', line 37

def version
  @version
end

#websiteObject

Returns the value of attribute website.



36
37
38
# File 'lib/teapot/project.rb', line 36

def website
  @website
end

Instance Method Details

#add_author(name, options) ⇒ Object



41
42
43
# File 'lib/teapot/project.rb', line 41

def add_author name, options
	@authors << Author.new(name, options[:email], options[:website])
end