Module: Basecamp3::Concerns::Parentable
- Included in:
- Basecamp3::CampfireLine, Basecamp3::Comment, Document, Forward, Message, Question, QuestionAnswer, ScheduleEntry, Todo, TodoList, Vault
- Defined in:
- lib/basecamp3/concerns/parentable.rb
Instance Method Summary collapse
-
#parent ⇒ Basecamp3::Model
Returns the parent.
Instance Method Details
#parent ⇒ Basecamp3::Model
Returns the parent.
9 10 11 12 13 14 |
# File 'lib/basecamp3/concerns/parentable.rb', line 9 def parent return nil if @parent.nil? klass = TypeMapper.map(@parent['type']) @mapped_parent ||= klass.new(@bucket) end |