Sha256: 3b96434a48fa6fd4773f068995597adefb6914521b4130301e887e0d32cb0910

Contents?: true

Size: 426 Bytes

Versions: 37

Compression:

Stored size: 426 Bytes

Contents

module MeducationSDK
  class MeshHeading < 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

37 entries across 37 versions & 1 rubygems

Version Path
meducation_sdk-1.6.10 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.6 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.5 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.4 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.3 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.2 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.1 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.0 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.7 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.6 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.5 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.4 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.3 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.2 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.1 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.5.0 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.4.4 lib/meducation_sdk/resources/mesh_heading.rb