Class: ToHistogram::Bucket
- Inherits:
-
Object
- Object
- ToHistogram::Bucket
- Defined in:
- lib/bucket.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(from, to, contents) ⇒ Bucket
constructor
A new instance of Bucket.
- #inspect ⇒ Object
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
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
9 10 11 |
# File 'lib/bucket.rb', line 9 def contents @contents end |
#from ⇒ Object (readonly)
Returns the value of attribute from.
9 10 11 |
# File 'lib/bucket.rb', line 9 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
9 10 11 |
# File 'lib/bucket.rb', line 9 def to @to end |
Instance Method Details
#inspect ⇒ Object
11 12 13 |
# File 'lib/bucket.rb', line 11 def inspect puts "#{self.class}: @from: #{@from}, @to: #{@to}, @contents: #{@contents.class}" end |