Sha256: 18200a99ec44d39844b6b384ba79ffd8d39fac3cc369be6504e132f9fa7b7fde

Contents?: true

Size: 524 Bytes

Versions: 7

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

require 'time'

module Kentaa
  module Api
    module Resources
      class Video
        attr_reader :data

        def initialize(data)
          @data = data
        end

        def id
          data[:id]
        end

        def created_at
          Time.parse(data[:created_at]) if data[:created_at]
        end

        def updated_at
          Time.parse(data[:updated_at]) if data[:updated_at]
        end

        def url
          data[:url]
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kentaa-api-0.8.0 lib/kentaa/api/resources/video.rb
kentaa-api-0.7.2 lib/kentaa/api/resources/video.rb
kentaa-api-0.7.1 lib/kentaa/api/resources/video.rb
kentaa-api-0.7.0 lib/kentaa/api/resources/video.rb
kentaa-api-0.6.0 lib/kentaa/api/resources/video.rb
kentaa-api-0.5.0 lib/kentaa/api/resources/video.rb
kentaa-api-0.4.0 lib/kentaa/api/resources/video.rb