Class: BinPacking::ExportBinding
- Inherits:
-
Object
- Object
- BinPacking::ExportBinding
- Defined in:
- lib/bin_packing/export_binding.rb
Instance Attribute Summary collapse
-
#bins ⇒ Object
readonly
Returns the value of attribute bins.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(bins, zoom) ⇒ ExportBinding
constructor
A new instance of ExportBinding.
- #zoom(value) ⇒ Object
Constructor Details
#initialize(bins, zoom) ⇒ ExportBinding
Returns a new instance of ExportBinding.
5 6 7 8 |
# File 'lib/bin_packing/export_binding.rb', line 5 def initialize(bins, zoom) @bins = bins @zoom = zoom end |
Instance Attribute Details
#bins ⇒ Object (readonly)
Returns the value of attribute bins.
3 4 5 |
# File 'lib/bin_packing/export_binding.rb', line 3 def bins @bins end |
Instance Method Details
#get_binding ⇒ Object
14 15 16 |
# File 'lib/bin_packing/export_binding.rb', line 14 def get_binding binding end |
#zoom(value) ⇒ Object
10 11 12 |
# File 'lib/bin_packing/export_binding.rb', line 10 def zoom(value) (value * @zoom).to_i end |