class Lecture
This class represents a lecture given at some point in some class.
Attributes
content[R]
date_created[R]
title[R]
Public Class Methods
new(json_str)
click to toggle source
Create an instance of Lecture
based upon json_str
that can be an hash or a JSON string.
Calls superclass method
Element::new
# File lib/Appolo/Models/secondary/lecture.rb, line 15 def initialize (json_str) json_data = check_json_info json_str super(json_data[ModelUtils::ID],nil,nil,nil) @content = json_data[ModelUtils::CONTENT] @date_created = json_data[ModelUtils::CREATED_WHEN] @title = json_data[ModelUtils::TITLE] end
Public Instance Methods
to_s()
click to toggle source
String representation of a Lecture
object.
# File lib/Appolo/Models/secondary/lecture.rb, line 27 def to_s "#{@id} - #{@title} : #{@date_created}" end