Class: PartObject
- Inherits:
-
Object
- Object
- PartObject
- Includes:
- DataFactory, Foundry, StringFactory, Workflows
- Defined in:
- lib/sambal-cle/data_objects/assessment.rb
Instance Attribute Summary collapse
-
#assessment ⇒ Object
Returns the value of attribute assessment.
-
#information ⇒ Object
Returns the value of attribute information.
-
#number_of_questions ⇒ Object
Returns the value of attribute number_of_questions.
-
#part_number ⇒ Object
Returns the value of attribute part_number.
-
#pool_name ⇒ Object
Returns the value of attribute pool_name.
-
#question_ordering ⇒ Object
Returns the value of attribute question_ordering.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
- #edit(opts = {}) ⇒ Object
-
#initialize(browser, opts = {}) ⇒ PartObject
constructor
A new instance of PartObject.
- #view ⇒ Object
Methods included from Workflows
menu_link, #open_my_site_by_name, #reset
Constructor Details
#initialize(browser, opts = {}) ⇒ PartObject
Returns a new instance of PartObject.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 195 def initialize(browser, opts={}) @browser = browser defaults = { :title=>random_alphanums, :information=>random_alphanums, :type=>:one_by_one, :question_ordering=>:order_as_listed } = defaults.merge(opts) () requires @assessment end |
Instance Attribute Details
#assessment ⇒ Object
Returns the value of attribute assessment.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def assessment @assessment end |
#information ⇒ Object
Returns the value of attribute information.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def information @information end |
#number_of_questions ⇒ Object
Returns the value of attribute number_of_questions.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def number_of_questions @number_of_questions end |
#part_number ⇒ Object
Returns the value of attribute part_number.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def part_number @part_number end |
#pool_name ⇒ Object
Returns the value of attribute pool_name.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def pool_name @pool_name end |
#question_ordering ⇒ Object
Returns the value of attribute question_ordering.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def question_ordering @question_ordering end |
#title ⇒ Object
Returns the value of attribute title.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
193 194 195 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 193 def type @type end |
Instance Method Details
#create ⇒ Object
210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 210 def create on EditAssessment do |edit| edit.add_part end on AddEditAssessmentPart do |part| part.title.set @title part.information.set @information part.send(@type).set part.send(@question_ordering).set # TODO: more to add here part.save end end |
#delete ⇒ Object
233 234 235 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 233 def delete end |
#edit(opts = {}) ⇒ Object
224 225 226 227 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 224 def edit opts={} (opts) end |
#view ⇒ Object
229 230 231 |
# File 'lib/sambal-cle/data_objects/assessment.rb', line 229 def view end |