Class: VORuby::STC::V1_10::Region::NegationType
Instance Attribute Summary collapse
Attributes inherited from RegionType
#note
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from RegionType
#fill_factor, #fill_factor=
#element
Constructor Details
#initialize(options = {}) ⇒ NegationType
Returns a new instance of NegationType.
842
843
844
845
|
# File 'lib/voruby/stc/1.10/region.rb', line 842
def initialize(options={})
raise_argument_required_error('region') if !options.has_key?(:region)
super(options)
end
|
Instance Attribute Details
#region ⇒ Object
Returns the value of attribute region.
838
839
840
|
# File 'lib/voruby/stc/1.10/region.rb', line 838
def region
@region
end
|
Class Method Details
.from_xml(xml) ⇒ Object
870
871
872
873
874
875
876
877
878
879
880
881
882
|
# File 'lib/voruby/stc/1.10/region.rb', line 870
def self.from_xml(xml)
root = element_from(xml)
options = {
:region => xml_to_obj(root, Region, true)
}
fill_factor = root.attributes.get_attribute_ns(obj_ns.uri, 'fill_factor')
options[:fill_factor] = Float(fill_factor.value) if fill_factor
note = root.attributes.get_attribute_ns(obj_ns.uri, 'note')
options[:note] = note.value if note
self.new(options)
end
|
.xml_type ⇒ Object
840
|
# File 'lib/voruby/stc/1.10/region.rb', line 840
def self.xml_type; 'negationType' end
|
Instance Method Details
#==(n) ⇒ Object
854
855
856
857
|
# File 'lib/voruby/stc/1.10/region.rb', line 854
def ==(n)
super(n) and
self.region == n.region
end
|
#to_s ⇒ Object
866
867
868
|
# File 'lib/voruby/stc/1.10/region.rb', line 866
def to_s
"NOT(#{self.region})"
end
|
#to_xml(name = nil) ⇒ Object
859
860
861
862
863
864
|
# File 'lib/voruby/stc/1.10/region.rb', line 859
def to_xml(name=nil)
el = element(name)
el.add_element(self.region.to_xml)
collapse_namespaces(name)
el
end
|