Class: TwitterCldr::Segmentation::StatusTable
- Inherits:
-
Object
- Object
- TwitterCldr::Segmentation::StatusTable
- Defined in:
- lib/twitter_cldr/segmentation/status_table.rb
Constant Summary collapse
- PACK_FMT =
'I!*'.freeze
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(values) ⇒ StatusTable
constructor
A new instance of StatusTable.
Constructor Details
#initialize(values) ⇒ StatusTable
Returns a new instance of StatusTable.
21 22 23 |
# File 'lib/twitter_cldr/segmentation/status_table.rb', line 21 def initialize(values) @values = values end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
19 20 21 |
# File 'lib/twitter_cldr/segmentation/status_table.rb', line 19 def values @values end |
Class Method Details
.load(hash) ⇒ Object
14 15 16 |
# File 'lib/twitter_cldr/segmentation/status_table.rb', line 14 def load(hash) new(Base64.decode64(hash[:table]).unpack(PACK_FMT)) end |
Instance Method Details
#dump ⇒ Object
25 26 27 |
# File 'lib/twitter_cldr/segmentation/status_table.rb', line 25 def dump { table: Base64.encode64(values.pack(PACK_FMT)).strip } end |