Class: Kaltura::KalturaRule
- Inherits:
-
KalturaObjectBase
- Object
- KalturaObjectBase
- Kaltura::KalturaRule
- Defined in:
- lib/kaltura_types.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
Actions to be performed by the player in case the rule is fulfilled.
-
#code ⇒ Object
Code to be thrown to the player in case the rule is fulfilled.
-
#conditions ⇒ Object
Conditions to validate the rule.
-
#contexts ⇒ Object
Indicates what contexts should be tested by this rule.
-
#description ⇒ Object
Short Rule Description.
-
#force_admin_validation ⇒ Object
Indicates if we should force ks validation for admin ks users as well.
-
#message ⇒ Object
Message to be thrown to the player in case the rule is fulfilled.
-
#rule_data ⇒ Object
Rule Custom Data to allow saving rule specific information.
-
#stop_processing ⇒ Object
Indicates that this rule is enough and no need to continue checking the rest of the rules.
Attributes inherited from KalturaObjectBase
#object_type, #related_objects
Instance Method Summary collapse
Methods inherited from KalturaObjectBase
Instance Attribute Details
#actions ⇒ Object
Actions to be performed by the player in case the rule is fulfilled
214 215 216 |
# File 'lib/kaltura_types.rb', line 214 def actions @actions end |
#code ⇒ Object
Code to be thrown to the player in case the rule is fulfilled
212 213 214 |
# File 'lib/kaltura_types.rb', line 212 def code @code end |
#conditions ⇒ Object
Conditions to validate the rule
216 217 218 |
# File 'lib/kaltura_types.rb', line 216 def conditions @conditions end |
#contexts ⇒ Object
Indicates what contexts should be tested by this rule
218 219 220 |
# File 'lib/kaltura_types.rb', line 218 def contexts @contexts end |
#description ⇒ Object
Short Rule Description
206 207 208 |
# File 'lib/kaltura_types.rb', line 206 def description @description end |
#force_admin_validation ⇒ Object
Indicates if we should force ks validation for admin ks users as well
222 223 224 |
# File 'lib/kaltura_types.rb', line 222 def force_admin_validation @force_admin_validation end |
#message ⇒ Object
Message to be thrown to the player in case the rule is fulfilled
210 211 212 |
# File 'lib/kaltura_types.rb', line 210 def @message end |
#rule_data ⇒ Object
Rule Custom Data to allow saving rule specific information
208 209 210 |
# File 'lib/kaltura_types.rb', line 208 def rule_data @rule_data end |
#stop_processing ⇒ Object
Indicates that this rule is enough and no need to continue checking the rest of the rules
220 221 222 |
# File 'lib/kaltura_types.rb', line 220 def stop_processing @stop_processing end |
Instance Method Details
#from_xml(xml_element) ⇒ Object
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/kaltura_types.rb', line 231 def from_xml(xml_element) super if xml_element.elements['description'] != nil self.description = xml_element.elements['description'].text end if xml_element.elements['ruleData'] != nil self.rule_data = xml_element.elements['ruleData'].text end if xml_element.elements['message'] != nil self. = xml_element.elements['message'].text end if xml_element.elements['code'] != nil self.code = xml_element.elements['code'].text end if xml_element.elements['actions'] != nil self.actions = KalturaClientBase.object_from_xml(xml_element.elements['actions'], 'KalturaRuleAction') end if xml_element.elements['conditions'] != nil self.conditions = KalturaClientBase.object_from_xml(xml_element.elements['conditions'], 'KalturaCondition') end if xml_element.elements['contexts'] != nil self.contexts = KalturaClientBase.object_from_xml(xml_element.elements['contexts'], 'KalturaContextTypeHolder') end if xml_element.elements['stopProcessing'] != nil self.stop_processing = xml_element.elements['stopProcessing'].text end if xml_element.elements['forceAdminValidation'] != nil self.force_admin_validation = xml_element.elements['forceAdminValidation'].text end end |