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-2.2.2 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.2.1 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.2.0 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.1.4 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.1.3 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.1.2 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.1.1 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.1.0 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.0.5 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.0.4 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.0.3 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.0.2 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.0.1 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-2.0.0 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.16 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.15 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.14 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.13 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.12 lib/meducation_sdk/resources/mesh_heading.rb
meducation_sdk-1.6.11 lib/meducation_sdk/resources/mesh_heading.rb