Sha256: 3745a9ae6cc540e7efa6dfa958eb272086304a77a666808b4e7ed1c888f6517f

Contents?: true

Size: 440 Bytes

Versions: 4

Compression:

Stored size: 440 Bytes

Contents

module MeducationSDK
  class MeshHeading < Loquor::Resource
    self.path = "/mesh_headings"

    def parents
      parent_ids.map { |p_id| MeshHeading.find(p_id) }
    end
    
    def parent_ids  
      @data[:parents].map { |p| p['id'] }
    end
  end

  class MeshHeadingMock < MeshHeading
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      name: "Some Mesh Heading",
      parent_ids: [2,3,4]
    }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
meducation_sdk-0.5.0 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-0.4.1 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-0.4.0 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-0.3.4 lib/meducation_sdk/resources/mesh_heading.rb