Class: Element

Inherits:
Object
  • Object
show all
Defined in:
lib/Appolo/Models/element.rb

Overview

This class represent the top abstraction of an element. Specifies common behavior.

Direct Known Subclasses

Classes, CourseUnit, LectiveSemester, Program, Student, Teacher

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, s_name, links, type_for_links) ⇒ Element

initializes the common behavior this class specifies.



12
13
14
15
16
# File 'lib/Appolo/Models/element.rb', line 12

def initialize (id, s_name, links, type_for_links)
  @id = id
  @short_name = s_name
  @links = Links.new(links, type_for_links)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/Appolo/Models/element.rb', line 8

def id
  @id
end

Returns the value of attribute links.



8
9
10
# File 'lib/Appolo/Models/element.rb', line 8

def links
  @links
end

#short_nameObject (readonly)

Returns the value of attribute short_name.



8
9
10
# File 'lib/Appolo/Models/element.rb', line 8

def short_name
  @short_name
end