class Correios::Frete::PacoteItem

Constants

DEFAULT_OPTIONS

Attributes

altura[RW]
comprimento[RW]
largura[RW]
peso[RW]

Public Class Methods

new(options = {}) { |self| ... } click to toggle source
# File lib/correios/frete/pacote_item.rb, line 14
def initialize(options = {})
  DEFAULT_OPTIONS.merge(options).each do |attr, value|
    self.send("#{attr}=", value)
  end

  yield self if block_given?
end

Public Instance Methods

volume() click to toggle source
# File lib/correios/frete/pacote_item.rb, line 22
def volume
  @comprimento * @largura * @altura
end