Class: Slaw::Parse::Blocklists::NumberingFormat
- Inherits:
-
Object
- Object
- Slaw::Parse::Blocklists::NumberingFormat
- Includes:
- Comparable
- Defined in:
- lib/slaw/parse/blocklists.rb
Constant Summary collapse
- @@a =
NumberingFormat.new(:a, 0)
- @@A =
NumberingFormat.new(:a, 1)
- @@i =
NumberingFormat.new(:i, 2)
- @@I =
NumberingFormat.new(:I, 3)
- @@aa =
NumberingFormat.new(:aa, 4)
- @@AA =
NumberingFormat.new(:AA, 5)
- @@unknown =
NumberingFormat.new(:unknown, 9)
Instance Attribute Summary collapse
-
#ordinal ⇒ Object
Returns the value of attribute ordinal.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(type, ordinal) ⇒ NumberingFormat
constructor
A new instance of NumberingFormat.
- #to_s ⇒ Object
Constructor Details
#initialize(type, ordinal) ⇒ NumberingFormat
Returns a new instance of NumberingFormat.
166 167 168 169 |
# File 'lib/slaw/parse/blocklists.rb', line 166 def initialize(type, ordinal) @type = type @ordinal = ordinal end |
Instance Attribute Details
#ordinal ⇒ Object
Returns the value of attribute ordinal.
164 165 166 |
# File 'lib/slaw/parse/blocklists.rb', line 164 def ordinal @ordinal end |
#type ⇒ Object
Returns the value of attribute type.
164 165 166 |
# File 'lib/slaw/parse/blocklists.rb', line 164 def type @type end |
Class Method Details
.A ⇒ Object
192 |
# File 'lib/slaw/parse/blocklists.rb', line 192 def self.A; @@A; end |
.a ⇒ Object
191 |
# File 'lib/slaw/parse/blocklists.rb', line 191 def self.a; @@a; end |
.aa ⇒ Object
195 |
# File 'lib/slaw/parse/blocklists.rb', line 195 def self.aa; @@aa; end |
.AA ⇒ Object
196 |
# File 'lib/slaw/parse/blocklists.rb', line 196 def self.AA; @@AA; end |
.I ⇒ Object
194 |
# File 'lib/slaw/parse/blocklists.rb', line 194 def self.I; @@I; end |
.i ⇒ Object
193 |
# File 'lib/slaw/parse/blocklists.rb', line 193 def self.i; @@i; end |
.unknown ⇒ Object
197 |
# File 'lib/slaw/parse/blocklists.rb', line 197 def self.unknown; @@unknown; end |
Instance Method Details
#<=>(other) ⇒ Object
175 176 177 |
# File 'lib/slaw/parse/blocklists.rb', line 175 def <=>(other) self.ordinal <=> other.ordinal end |
#eql?(other) ⇒ Boolean
171 172 173 |
# File 'lib/slaw/parse/blocklists.rb', line 171 def eql?(other) self.ordinal == other.ordinal end |
#to_s ⇒ Object
179 180 181 |
# File 'lib/slaw/parse/blocklists.rb', line 179 def to_s @type.to_s end |