Class: Senkyoshi::Module
- Defined in:
- lib/senkyoshi/models/module.rb
Instance Attribute Summary collapse
-
#module_items ⇒ Object
Returns the value of attribute module_items.
Instance Method Summary collapse
- #canvas_conversion ⇒ Object
-
#initialize(title, identifier) ⇒ Module
constructor
A new instance of Module.
Methods inherited from Resource
#_find_directories, #_fix_path, #_matches_directory_xid?, #_search_and_replace, #cleanup, #fix_html, get_pre_data, #matches_xid?, #strip_xid
Constructor Details
#initialize(title, identifier) ⇒ Module
Returns a new instance of Module.
7 8 9 10 11 |
# File 'lib/senkyoshi/models/module.rb', line 7 def initialize(title, identifier) @identifier = identifier @title = title @module_items = [] end |
Instance Attribute Details
#module_items ⇒ Object
Returns the value of attribute module_items.
5 6 7 |
# File 'lib/senkyoshi/models/module.rb', line 5 def module_items @module_items end |
Instance Method Details
#canvas_conversion ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/senkyoshi/models/module.rb', line 13 def canvas_conversion(*) CanvasCc::CanvasCC::Models::CanvasModule.new.tap do |cc_module| cc_module.identifier = @identifier cc_module.title = @title cc_module.workflow_state = "published" cc_module.module_items = @module_items end end |