Class: PostmonRuby::Track
- Inherits:
-
Object
- Object
- PostmonRuby::Track
- Defined in:
- lib/postmon_ruby/track.rb
Constant Summary collapse
- @@track_attributes =
TODO criar um model para salvar o historico do rastreio
[ :codigo, :servico ]
Instance Attribute Summary collapse
-
#historico ⇒ Object
readonly
Returns the value of attribute historico.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(options = {}) ⇒ Track
Returns a new instance of Track.
10 11 12 13 14 15 16 |
# File 'lib/postmon_ruby/track.rb', line 10 def initialize(={}) @not_found = true if .not_found? @@track_attributes.each do |attribute| send(:"#{attribute}=", [attribute.to_s] || "") end @historico = ["historico"] || [] end |
Instance Attribute Details
#historico ⇒ Object (readonly)
Returns the value of attribute historico.
8 9 10 |
# File 'lib/postmon_ruby/track.rb', line 8 def historico @historico end |