Sha256: 484aa0c7644c824d45a7d9a1663efbf74e5ebd2045d1f96b05e875606d482987

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

module Cartola
  module Market
    class Shutdown < RestModel
      property :dia, type: Integer
      property :mes, type: Integer
      property :ano, type: Integer
      property :hora, type: Integer
      property :minuto, type: Integer

      def to_datetime
        DateTime.serialize(prepare_serialize)
      end

      private

      def prepare_serialize
        "#{ano}-#{mes}-#{dia} #{hora}:#{minuto}:00"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cartola-0.1.4 lib/cartola/market/shutdown.rb