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.
-
#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.
-
#load_path ⇒ Object
The directories to search within the project when requiring files.
-
#name ⇒ Object
The name of the project.
-
#namespace ⇒ Object
The toplevel namespace of API, e.g.
-
#organizations ⇒ Object
The organizations involved with 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
112 113 114 |
# File 'lib/indexer/attributes.rb', line 112 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.
125 126 127 |
# File 'lib/indexer/attributes.rb', line 125 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.
115 116 117 |
# File 'lib/indexer/attributes.rb', line 115 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.
135 136 137 |
# File 'lib/indexer/attributes.rb', line 135 def created @created 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.
92 93 94 |
# File 'lib/indexer/attributes.rb', line 92 def engines @engines end |
#install_message ⇒ Object
The post-installation message.
132 133 134 |
# File 'lib/indexer/attributes.rb', line 132 def @install_message end |
#load_path ⇒ Object
The directories to search within the project when requiring files
89 90 91 |
# File 'lib/indexer/attributes.rb', line 89 def load_path @load_path 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?
139 140 141 |
# File 'lib/indexer/attributes.rb', line 139 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 |
#platforms ⇒ Object
List of platforms supported.
95 96 97 |
# File 'lib/indexer/attributes.rb', line 95 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.
102 103 104 |
# File 'lib/indexer/attributes.rb', line 102 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.
86 87 88 |
# File 'lib/indexer/attributes.rb', line 86 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 |