Class: ToHistogram::Bucket

Inherits:
Object
  • Object
show all
Defined in:
lib/bucket.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, to, contents) ⇒ Bucket

Returns a new instance of Bucket.



4
5
6
7
8
# File 'lib/bucket.rb', line 4

def initialize(from, to, contents)
    @from       = from
    @to         = to
    @contents   = contents
end

Instance Attribute Details

#contentsObject (readonly)

Returns the value of attribute contents.



9
10
11
# File 'lib/bucket.rb', line 9

def contents
  @contents
end

#fromObject (readonly)

Returns the value of attribute from.



9
10
11
# File 'lib/bucket.rb', line 9

def from
  @from
end

#toObject (readonly)

Returns the value of attribute to.



9
10
11
# File 'lib/bucket.rb', line 9

def to
  @to
end

Instance Method Details

#inspectObject



11
12
13
# File 'lib/bucket.rb', line 11

def inspect
    puts "#{self.class}: @from: #{@from}, @to: #{@to}, @contents: #{@contents.class}"
end