Class: OneRoster::Types::Base
- Inherits:
-
Object
- Object
- OneRoster::Types::Base
- Defined in:
- lib/types/base.rb
Direct Known Subclasses
Application, Class, Classroom, Course, Enrollment, Student, Teacher, Term
Instance Method Summary collapse
Instance Method Details
#to_h ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/types/base.rb', line 6 def to_h instance_variables.each_with_object({}) do |instance_var, variables| key = instance_var.to_s.tr('@', '').to_sym value = instance_variable_get(instance_var) variables[key] = value end end |