Sha256: e9aa00582f2cf8221a9129ee694dbecc169eab81773dc6504a2115638d7ce779

Contents?: true

Size: 509 Bytes

Versions: 3

Compression:

Stored size: 509 Bytes

Contents

require 'active_attr'

module Dovico
  class Assignment
    URL_PATH = 'Assignments'

    include ActiveAttr::Model

    attribute :id
    attribute :assignement_id
    attribute :name
    attribute :start_date
    attribute :finish_date


    def self.parse(hash)
      self.new(
        id:           hash["ItemID"],
        assignement_id: hash["AssignmentID"],
        name:         hash["Name"],
        start_date:   hash["StartDate"],
        finish_date:  hash["FinishDate"]
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dovico-1.4.0 lib/dovico/model/assignment.rb
dovico-1.3.0 lib/dovico/model/assignment.rb
dovico-1.2.0 lib/dovico/model/assignment.rb