Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 739 Bytes
1 | class Status |
2 | attr_accessor :id, :name |
3 | |
4 | def initialize(options = {}) |
5 | options = options.symbolize_keys |
6 | @id, @name = options[:id], options[:name] |
7 | end |
8 | |
9 | def symbol |
10 | @name.to_s.downcase.intern |
11 | end |
12 | |
13 | def self.[](value) |
14 | @@statuses.find { |status| status.symbol == value.to_s.downcase.intern } |
15 | end |
16 | |
17 | def self.find(id) |
18 | @@statuses.find { |status| status.id.to_s == id.to_s } |
19 | end |
20 | |
21 | def self.find_all |
22 | @@statuses.dup |
23 | end |
24 | |
25 | @@statuses = [ |
26 | Status.new(:id => 1, :name => 'Draft' ), |
27 | Status.new(:id => 50, :name => 'Reviewed' ), |
28 | Status.new(:id => 90, :name => 'Scheduled'), |
29 | Status.new(:id => 100, :name => 'Published'), |
30 | Status.new(:id => 101, :name => 'Hidden' ) |
31 | ] |
32 | |
33 | end |