class Teapot::Project

Constants

Author

Attributes

authors[R]
license[RW]
summary[RW]
title[RW]
version[RW]
website[RW]

Public Class Methods

new(context, package, name) click to toggle source
Calls superclass method Teapot::Definition::new
# File lib/teapot/project.rb, line 27
def initialize(context, package, name)
        super context, package, name
        
        @version = "0.0.0"
        @authors = []
end

Public Instance Methods

add_author(name, options = {}) click to toggle source
# File lib/teapot/project.rb, line 64
def add_author(name, options = {})
        @authors << Author.new(name, options[:email], options[:website])
end
freeze() click to toggle source
Calls superclass method Teapot::Definition#freeze
# File lib/teapot/project.rb, line 44
def freeze
        @title.freeze
        @summary.freeze
        @license.freeze
        @website.freeze
        @version.freeze
        
        @authors.freeze
        
        super
end
name() click to toggle source
# File lib/teapot/project.rb, line 34
def name
        if @title
                # Prefer title, it retains case.
                Build::Name.new(@title)
        else
                # Otherwise, if we don't have title, use the target name.
                Build::Name.from_target(@name)
        end
end