| Class | SM::Attribute |
| In: |
markup/simple_markup/inline.rb
|
| Parent: | Object |
We manage a set of attributes. Each attribute has a symbol name and a bit value
| SPECIAL | = | 1 |
# File markup/simple_markup/inline.rb, line 22
22: def Attribute.as_string(bitmap)
23: return "none" if bitmap.zero?
24: res = []
25: @@name_to_bitmap.each do |name, bit|
26: res << name if (bitmap & bit) != 0
27: end
28: res.join(",")
29: end
# File markup/simple_markup/inline.rb, line 12
12: def Attribute.bitmap_for(name)
13: bitmap = @@name_to_bitmap[name]
14: if !bitmap
15: bitmap = @@next_bitmap
16: @@next_bitmap <<= 1
17: @@name_to_bitmap[name] = bitmap
18: end
19: bitmap
20: end