Sha256: 671cea94c8a66c3eb4237bde9670ef292beb35cc2daa0ed9ce9822c105b89843

Contents?: true

Size: 301 Bytes

Versions: 18

Compression:

Stored size: 301 Bytes

Contents

require 'time'

module Twitter
  module Creatable

    # Time when the object was created on Twitter
    #
    # @return [Time]
    def created_at
      @created_at ||= Time.parse(@attrs[:created_at]) if created?
    end

  private

    def created?
      !@attrs[:created_at].nil?
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
twitter-4.8.1 lib/twitter/creatable.rb
twitter-4.8.0 lib/twitter/creatable.rb
twitter-4.7.0 lib/twitter/creatable.rb
twitter-4.6.2 lib/twitter/creatable.rb
twitter-4.6.1 lib/twitter/creatable.rb
twitter-4.6.0 lib/twitter/creatable.rb
twitter-4.5.0 lib/twitter/creatable.rb
twitter-4.4.4 lib/twitter/creatable.rb
twitter-4.4.3 lib/twitter/creatable.rb
twitter-4.4.2 lib/twitter/creatable.rb
twitter-4.4.1 lib/twitter/creatable.rb
twitter-4.4.0 lib/twitter/creatable.rb
twitter-4.3.0 lib/twitter/creatable.rb
twitter-4.2.0 lib/twitter/creatable.rb
twitter-4.1.2 lib/twitter/creatable.rb
twitter-4.1.1 lib/twitter/creatable.rb
twitter-4.1.0 lib/twitter/creatable.rb
twitter-4.0.0 lib/twitter/creatable.rb