Class: UClassifyTrainClass
- Inherits:
-
Object
- Object
- UClassifyTrainClass
- Defined in:
- lib/uclassify_training_class.rb
Instance Method Summary collapse
-
#initialize(train_id, class_name, text_id) ⇒ UClassifyTrainClass
constructor
A new instance of UClassifyTrainClass.
- #to_xml_node(xml_document) ⇒ Object
Constructor Details
#initialize(train_id, class_name, text_id) ⇒ UClassifyTrainClass
Returns a new instance of UClassifyTrainClass.
2 3 4 5 6 |
# File 'lib/uclassify_training_class.rb', line 2 def initialize(train_id,class_name,text_id) @train_id = train_id @class_name = class_name @text_id = text_id end |
Instance Method Details
#to_xml_node(xml_document) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/uclassify_training_class.rb', line 8 def to_xml_node xml_document class_node = Nokogiri::XML::Node.new('train',xml_document) class_node['id']=@train_id class_node['className']=@class_name class_node['textId']=@text_id class_node end |