# PLEASE DO NOT EDIT THIS CODE
# This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!
# NOTE: Ruby generator is experimental and is missing some features available in
# in other Umple generated languages like Java or PHP
module Example
class Student
#------------------------
# MEMBER VARIABLES
#------------------------
#Student Attributes - for documentation purposes
#attr_reader :number
#Student Associations - for documentation purposes
#attr_reader :mentor
#------------------------
# CONSTRUCTOR
#------------------------
def initialize(a_number, a_mentor)
@initialized = false
@deleted = false
@number = a_number
@can_set_number = false
@can_set_mentor = true
set_mentor(a_mentor)
@initialized = true
end
#------------------------
# INTERFACE
#------------------------
def get_number
@number
end
def get_mentor
@mentor
end
def has_mentor
has = !@mentor.nil?
has
end
def set_mentor(a_new_mentor)
was_set = false
return false unless @can_set_mentor
@can_set_mentor = false
@mentor = a_new_mentor
was_set = true
was_set
end
def delete
@deleted = true
end
end
end
# PLEASE DO NOT EDIT THIS CODE
# This code was generated using the UMPLE 1.33.0.6934.a386b0a58 modeling language!
# NOTE: Ruby generator is experimental and is missing some features available in
# in other Umple generated languages like Java or PHP
module Example
class Mentor
#------------------------
# MEMBER VARIABLES
#------------------------
#Mentor Attributes - for documentation purposes
#attr_reader :name
#------------------------
# CONSTRUCTOR
#------------------------
def initialize(a_name)
@initialized = false
@deleted = false
@name = a_name
@can_set_name = false
@initialized = true
end
#------------------------
# INTERFACE
#------------------------
def get_name
@name
end
def delete
@deleted = true
end
end
end