Class: Teapot::Project
- Inherits:
-
Definition
- Object
- Definition
- Teapot::Project
- Defined in:
- lib/teapot/project.rb
Defined Under Namespace
Classes: Author
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#license ⇒ Object
Returns the value of attribute license.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#version ⇒ Object
Returns the value of attribute version.
-
#website ⇒ Object
Returns the value of attribute website.
Attributes inherited from Definition
#context, #description, #name, #package
Instance Method Summary collapse
- #add_author(name, options = {}) ⇒ Object
- #freeze ⇒ Object
-
#initialize(context, package, name) ⇒ Project
constructor
A new instance of Project.
Methods inherited from Definition
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
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
50 51 52 |
# File 'lib/teapot/project.rb', line 50 def @authors end |
#license ⇒ Object
Returns the value of attribute license.
46 47 48 |
# File 'lib/teapot/project.rb', line 46 def license @license end |
#summary ⇒ Object
Returns the value of attribute summary.
45 46 47 |
# File 'lib/teapot/project.rb', line 45 def summary @summary end |
#version ⇒ Object
Returns the value of attribute version.
48 49 50 |
# File 'lib/teapot/project.rb', line 48 def version @version end |
#website ⇒ Object
Returns the value of attribute website.
47 48 49 |
# File 'lib/teapot/project.rb', line 47 def website @website end |
Instance Method Details
#add_author(name, options = {}) ⇒ Object
52 53 54 |
# File 'lib/teapot/project.rb', line 52 def (name, = {}) @authors << Author.new(name, [:email], [:website]) end |
#freeze ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/teapot/project.rb', line 34 def freeze @summary.freeze @license.freeze @website.freeze @version.freeze @authors.freeze super end |