Sha256: f1e6c8121916b115d7e12b6ce167c33dec7b7e9054d195eb9df38990ff3acdc8

Contents?: true

Size: 525 Bytes

Versions: 1

Compression:

Stored size: 525 Bytes

Contents


module Binenc
  module Ruby
    
    class ASN1DateTime
      include ASN1Object
      
      def encoded
        raise BinencEngineException, "Given value is not a Time object. #{@value.class}" if not @value.is_a?(Time)
        OpenSSL::ASN1::GeneralizedTime.new(@value).to_der
      end

      def is_equal?(val)

        case val
        when Integer
          @value.to_i == val
        when Time
          @value.to_i == val.to_i
        else
          @value == val
        end
        
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
binenc-ruby-0.1.0 lib/binenc/asn1_engine/object/datetime.rb