Class: HMap::BucketStr
- Inherits:
-
Object
- Object
- HMap::BucketStr
- Defined in:
- lib/hmap/hmap/hmap_bucketstr.rb
Overview
hmap bucket string
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#perfix ⇒ Object
readonly
Returns the value of attribute perfix.
-
#suffix ⇒ Object
readonly
Returns the value of attribute suffix.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(key, perfix, suffix) ⇒ BucketStr
constructor
A new instance of BucketStr.
- #to_a ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(key, perfix, suffix) ⇒ BucketStr
Returns a new instance of BucketStr.
8 9 10 11 12 |
# File 'lib/hmap/hmap/hmap_bucketstr.rb', line 8 def initialize(key, perfix, suffix) @key = key @perfix = perfix @suffix = suffix end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/hmap/hmap/hmap_bucketstr.rb', line 6 def key @key end |
#perfix ⇒ Object (readonly)
Returns the value of attribute perfix.
6 7 8 |
# File 'lib/hmap/hmap/hmap_bucketstr.rb', line 6 def perfix @perfix end |
#suffix ⇒ Object (readonly)
Returns the value of attribute suffix.
6 7 8 |
# File 'lib/hmap/hmap/hmap_bucketstr.rb', line 6 def suffix @suffix end |
Instance Method Details
#description ⇒ Object
22 23 24 25 26 |
# File 'lib/hmap/hmap/hmap_bucketstr.rb', line 22 def description <<-DESC Key #{@key} -> Prefix #{@perfix}, Suffix #{@suffix} DESC end |
#to_a ⇒ Object
18 19 20 |
# File 'lib/hmap/hmap/hmap_bucketstr.rb', line 18 def to_a [key, perfix, suffix] end |
#value ⇒ Object
14 15 16 |
# File 'lib/hmap/hmap/hmap_bucketstr.rb', line 14 def value [perfix, suffix] end |