Sha256: 4042fe4403217a691c657e456103eaa1d58944b3139a4420872126fd5f56adff
Contents?: true
Size: 553 Bytes
Versions: 3
Compression:
Stored size: 553 Bytes
Contents
module RpiMarca class Priority attr_reader :number, :date, :country def initialize(number:, date:, country:) fail ParseError, 'Priority must have priority date' unless date @number = number @date = date @country = country end def self.parse(el) return unless el new( number: Helpers.get_attribute_value(el, 'numero'), date: Helpers.parse_date(Helpers.get_attribute_value(el, 'data')), country: Helpers.get_attribute_value(el, 'pais') ) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rpi_marca-0.0.3 | lib/rpi_marca/priority.rb |
rpi_marca-0.0.2 | lib/rpi_marca/priority.rb |
rpi_marca-0.0.1 | lib/rpi_marca/priority.rb |