class Senkyoshi::ModuleItem
Public Class Methods
find_item_from_id_ref(module_items, id_ref)
click to toggle source
# File lib/senkyoshi/models/module_item.rb, line 30 def self.find_item_from_id_ref(module_items, id_ref) module_items.detect { |item| item.identifierref == id_ref } end
new(title, type, identifierref, url, indent, id)
click to toggle source
# File lib/senkyoshi/models/module_item.rb, line 20 def initialize(title, type, identifierref, url, indent, id) @title = title @identifier = id || Senkyoshi.create_random_hex @content_type = type @identifierref = identifierref @indent = indent @workflow_state = "active" @url = url end
Public Instance Methods
canvas_conversion(*)
click to toggle source
# File lib/senkyoshi/models/module_item.rb, line 34 def canvas_conversion(*) CanvasCc::CanvasCC::Models::ModuleItem.new.tap do |item| item.title = @title item.identifier = @identifier item.content_type = @content_type item.identifierref = @identifierref item.workflow_state = @workflow_state item.indent = @indent item.url = @url end end