Class: LibXML::XML::Schema::Attribute
- Inherits:
-
Object
- Object
- LibXML::XML::Schema::Attribute
- Defined in:
- lib/libxml/schema/attribute.rb,
ext/libxml/ruby_xml_schema_attribute.c
Constant Summary collapse
- REQUIRED =
1- OPTIONAL =
2
Instance Attribute Summary collapse
- #name ⇒ Object readonly
- #namespace ⇒ Object readonly
- #occurs ⇒ Object readonly
- #type ⇒ Object readonly
- #value ⇒ Object readonly
Instance Method Summary collapse
-
#default ⇒ Object
call-seq: attribute.default -> String or nil.
- #node ⇒ Object
-
#required? ⇒ Boolean
call-seq: attribute.required? -> true or false.
Instance Attribute Details
#name ⇒ Object (readonly)
#namespace ⇒ Object (readonly)
#occurs ⇒ Object (readonly)
#type ⇒ Object (readonly)
#value ⇒ Object (readonly)
Instance Method Details
#default ⇒ Object
call-seq:
attribute.default -> String or nil
Returns the default value for this attribute, or nil if none.
13 14 15 |
# File 'lib/libxml/schema/attribute.rb', line 13 def default node['default'] end |
#node ⇒ Object
88 89 90 91 92 93 94 95 |
# File 'ext/libxml/ruby_xml_schema_attribute.c', line 88
static VALUE rxml_schema_attribute_node(VALUE self)
{
xmlSchemaAttributeUsePtr attr;
TypedData_Get_Struct(self, xmlSchemaAttributeUse, &rxml_schema_attribute_type, attr);
return rxml_node_wrap(attr->node);
}
|
#required? ⇒ Boolean
call-seq:
attribute.required? -> true or false
Returns whether this attribute is required.
21 22 23 |
# File 'lib/libxml/schema/attribute.rb', line 21 def required? occurs == REQUIRED end |