Module: Indexer::Attributes
Overview
The Attributes module defines all of the accepted metadata fields.
Instance Attribute Summary collapse
-
#alternatives ⇒ Object
A list of packages that provide more or less the same functionality.
-
#authors ⇒ Object
The authors of the project The first author should be the primary contact.
-
#categories ⇒ Object
Categories can be used to help clarify the purpose of a project, e.g.
-
#codename ⇒ Object
The nick name for the particular version, e.g.
-
#conflicts ⇒ Object
The packages with which this project cannot function.
-
#copyrights ⇒ Object
The copyrights and licenses of the project.
-
#created ⇒ Object
The date the project was started.
-
#customs ⇒ Object
The names of any user-defined fields.
-
#date ⇒ Object
The date of this version.
-
#description ⇒ Object
The project description.
-
#engines ⇒ Object
List of language engine/version family supported.
-
#install_message ⇒ Object
The post-installation message.
-
#name ⇒ Object
The name of the project.
-
#namespace ⇒ Object
The toplevel namespace of API, e.g.
-
#organizations ⇒ Object
The organizations involved with the project.
-
#paths ⇒ Object
Map of path sets which can be used to identify paths within the project.
-
#platforms ⇒ Object
List of platforms supported.
-
#repositories ⇒ Object
The repository URLs for the project.
-
#requirements ⇒ Object
The packages this package requires to function.
-
#resources ⇒ Object
The resource locators for the project.
-
#revision ⇒ Object
The revision of ruby meta specification.
-
#sources ⇒ Object
Files from which to import metadata.
-
#suite ⇒ Object
The suite to which the project belongs.
-
#summary ⇒ Object
The project summary.
-
#title ⇒ Object
The project title.
-
#type ⇒ Object
The type of ruby meta specification.
-
#version ⇒ Object
The version of the project.
-
#webcvs ⇒ Object
URI for linking to source code.
Class Method Summary collapse
-
.attr_accessor(name) ⇒ Object
Define attribute, plus track it.
Instance Method Summary collapse
Instance Attribute Details
#alternatives ⇒ Object
A list of packages that provide more or less the same functionality. A good example is for a markdown library.
alternatives: - rdiscount - redcarpet - BlueCloth
118 119 120 |
# File 'lib/indexer/attributes.rb', line 118 def alternatives @alternatives end |
#authors ⇒ Object
The authors of the project The first author should be the primary contact.
72 73 74 |
# File 'lib/indexer/attributes.rb', line 72 def @authors end |
#categories ⇒ Object
Categories can be used to help clarify the purpose of
a project, e.g. testing
or rest
. There are no standard
categories, just use common sense. Categories must be single-line
strings. When comparisons are made they will be downcased.
131 132 133 |
# File 'lib/indexer/attributes.rb', line 131 def categories @categories end |
#codename ⇒ Object
The nick name for the particular version, e.g. "Lucid Lynx".
50 51 52 |
# File 'lib/indexer/attributes.rb', line 50 def codename @codename end |
#conflicts ⇒ Object
The packages with which this project cannot function.
121 122 123 |
# File 'lib/indexer/attributes.rb', line 121 def conflicts @conflicts end |
#copyrights ⇒ Object
The copyrights and licenses of the project.
68 69 70 |
# File 'lib/indexer/attributes.rb', line 68 def copyrights @copyrights end |
#created ⇒ Object
The date the project was started.
141 142 143 |
# File 'lib/indexer/attributes.rb', line 141 def created @created end |
#customs ⇒ Object
The names of any user-defined fields.
148 149 150 |
# File 'lib/indexer/attributes.rb', line 148 def customs @customs end |
#date ⇒ Object
The date of this version.
53 54 55 |
# File 'lib/indexer/attributes.rb', line 53 def date @date end |
#description ⇒ Object
The project description
62 63 64 |
# File 'lib/indexer/attributes.rb', line 62 def description @description end |
#engines ⇒ Object
List of language engine/version family supported.
98 99 100 |
# File 'lib/indexer/attributes.rb', line 98 def engines @engines end |
#install_message ⇒ Object
The post-installation message.
138 139 140 |
# File 'lib/indexer/attributes.rb', line 138 def @install_message end |
#name ⇒ Object
The name of the project
44 45 46 |
# File 'lib/indexer/attributes.rb', line 44 def name @name end |
#namespace ⇒ Object
The toplevel namespace of API, e.g. module Foo
or class Bar
.
NOTE: how to best handle this?
145 146 147 |
# File 'lib/indexer/attributes.rb', line 145 def namespace @namespace end |
#organizations ⇒ Object
The organizations involved with the project.
75 76 77 |
# File 'lib/indexer/attributes.rb', line 75 def organizations @organizations end |
#paths ⇒ Object
Map of path sets which can be used to identify paths within the project. The actual path keys largely depend on the project type, but in general should reflect the FHS,
For example, the lib
path key is used by Ruby projects to designate
which project paths to search within when requiring files.
95 96 97 |
# File 'lib/indexer/attributes.rb', line 95 def paths @paths end |
#platforms ⇒ Object
List of platforms supported.
101 102 103 |
# File 'lib/indexer/attributes.rb', line 101 def platforms @platforms end |
#repositories ⇒ Object
The repository URLs for the project.
81 82 83 |
# File 'lib/indexer/attributes.rb', line 81 def repositories @repositories end |
#requirements ⇒ Object
The packages this package requires to function.
108 109 110 |
# File 'lib/indexer/attributes.rb', line 108 def requirements @requirements end |
#resources ⇒ Object
The resource locators for the project.
78 79 80 |
# File 'lib/indexer/attributes.rb', line 78 def resources @resources end |
#revision ⇒ Object
The revision of ruby meta specification.
31 32 33 |
# File 'lib/indexer/attributes.rb', line 31 def revision @revision end |
#sources ⇒ Object
Files from which to import metadata.
41 42 43 |
# File 'lib/indexer/attributes.rb', line 41 def sources @sources end |
#suite ⇒ Object
The suite to which the project belongs.
65 66 67 |
# File 'lib/indexer/attributes.rb', line 65 def suite @suite end |
#summary ⇒ Object
The project summary
59 60 61 |
# File 'lib/indexer/attributes.rb', line 59 def summary @summary end |
#title ⇒ Object
The project title
56 57 58 |
# File 'lib/indexer/attributes.rb', line 56 def title @title end |
#type ⇒ Object
The type of ruby meta specification.
38 39 40 |
# File 'lib/indexer/attributes.rb', line 38 def type @type end |
#version ⇒ Object
The version of the project
47 48 49 |
# File 'lib/indexer/attributes.rb', line 47 def version @version end |
#webcvs ⇒ Object
URI for linking to source code.
87 88 89 |
# File 'lib/indexer/attributes.rb', line 87 def webcvs @webcvs end |
Class Method Details
.attr_accessor(name) ⇒ Object
Define attribute, plus track it.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/indexer/attributes.rb', line 12 def self.attr_accessor(name) Indexer.attributes << name.to_sym class_eval %{ def #{name} @data[:#{name}] end def #{name}=(val) @data[:#{name}] = val end } end |
Instance Method Details
#attributes ⇒ Object
26 27 28 |
# File 'lib/indexer/attributes.rb', line 26 def attributes Indexer.attributes end |