Class: MINT::AISingleChoiceElement

Inherits:
AIChoiceElement show all
Defined in:
lib/MINT-core/model/aui/AISingleChoiceElement.rb

Constant Summary

Constants inherited from Interactor

Interactor::PUBLISH_ATTRIBUTES

Instance Method Summary collapse

Methods inherited from AIChoiceElement

#unchoose_others

Methods inherited from AIReference

#refers

Methods inherited from AIO

#exists_next, #exists_parent, #exists_prev, #focus_next, #focus_parent, #focus_previous, getModel, #inform_parent_presenting, #next, #next2str, #parent, #parent2str, #parent=, #previous, #previous2str

Methods inherited from Interactor

class_from_channel_name, #create_attribute_channel_name, create_channel_name, #create_channel_w_name, get, getModel, get_dm, #init_statemachine, #is_in?, #new_states, notify, #process_event, #process_event!, #process_event_vars, #publish_update, #states, #states=, #sync_event, #sync_states, #to_dot, wait

Methods included from InteractorHelpers

#restart_timeout, #start_timeout, #stop_timeout

Instance Method Details

#chooseObject



16
17
18
19
20
# File 'lib/MINT-core/model/aui/AISingleChoiceElement.rb', line 16

def choose
  if self.is_in? :unchosen
    self.process_event(:choose)
  end
end

#getSCXMLObject



4
5
6
# File 'lib/MINT-core/model/aui/AISingleChoiceElement.rb', line 4

def getSCXML
  "#{File.dirname(__FILE__)}/aisinglechoiceelement.scxml"
end

#remove_from_choiceObject



8
9
10
11
12
13
14
# File 'lib/MINT-core/model/aui/AISingleChoiceElement.rb', line 8

def remove_from_choice
    p = self.parent
    p.children = p.children.delete_if{|e| e.name.eql? self.name}
    self.parent = nil
    p.save
    self.save
end