Class: Iceberg::BucketTransform

Inherits:
Transform show all
Defined in:
lib/iceberg/transforms.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(num_buckets) ⇒ BucketTransform

Returns a new instance of BucketTransform.



18
19
20
# File 'lib/iceberg/transforms.rb', line 18

def initialize(num_buckets)
  @num_buckets = num_buckets
end

Instance Attribute Details

#num_bucketsObject (readonly)

Returns the value of attribute num_buckets.



16
17
18
# File 'lib/iceberg/transforms.rb', line 16

def num_buckets
  @num_buckets
end

Instance Method Details

#==(other) ⇒ Object



22
23
24
# File 'lib/iceberg/transforms.rb', line 22

def ==(other)
  other.is_a?(self.class) && other.num_buckets == @num_buckets
end

#inspectObject



26
27
28
# File 'lib/iceberg/transforms.rb', line 26

def inspect
  "#<#{self.class.name} num_buckets=#{@num_buckets.inspect}>"
end