Class: StackOne::Models::Shared::Course

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/stack_one/models/shared/course.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(active: nil, authors: nil, categories: nil, content_ids: nil, cover_url: nil, created_at: nil, description: nil, duration: nil, external_reference: nil, id: nil, languages: nil, provider: nil, remote_content_ids: nil, remote_id: nil, skills: nil, title: nil, unified_custom_fields: nil, updated_at: nil, url: nil) ⇒ Course

Returns a new instance of Course.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/stack_one/models/shared/course.rb', line 55

def initialize(active: nil, authors: nil, categories: nil, content_ids: nil, cover_url: nil, created_at: nil, description: nil, duration: nil, external_reference: nil, id: nil, languages: nil, provider: nil, remote_content_ids: nil, remote_id: nil, skills: nil, title: nil, unified_custom_fields: nil, updated_at: nil, url: nil)
  @active = active
  @authors = authors
  @categories = categories
  @content_ids = content_ids
  @cover_url = cover_url
  @created_at = created_at
  @description = description
  @duration = duration
  @external_reference = external_reference
  @id = id
  @languages = languages
  @provider = provider
  @remote_content_ids = remote_content_ids
  @remote_id = remote_id
  @skills = skills
  @title = title
  @unified_custom_fields = unified_custom_fields
  @updated_at = updated_at
  @url = url
end

Instance Method Details

#==(other) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/stack_one/models/shared/course.rb', line 78

def ==(other)
  return false unless other.is_a? self.class
  return false unless @active == other.active
  return false unless @authors == other.authors
  return false unless @categories == other.categories
  return false unless @content_ids == other.content_ids
  return false unless @cover_url == other.cover_url
  return false unless @created_at == other.created_at
  return false unless @description == other.description
  return false unless @duration == other.duration
  return false unless @external_reference == other.external_reference
  return false unless @id == other.id
  return false unless @languages == other.languages
  return false unless @provider == other.provider
  return false unless @remote_content_ids == other.remote_content_ids
  return false unless @remote_id == other.remote_id
  return false unless @skills == other.skills
  return false unless @title == other.title
  return false unless @unified_custom_fields == other.unified_custom_fields
  return false unless @updated_at == other.updated_at
  return false unless @url == other.url
  true
end