Class: XsdReader::Attribute

Inherits:
Object
  • Object
show all
Includes:
Shared
Defined in:
lib/xsd_reader/attribute.rb

Instance Attribute Summary

Attributes included from Shared

#options

Instance Method Summary collapse

Methods included from Shared

#[], #all_elements, #attributes, #base, #base_name, #base_namespace, #child_elements?, #choices, #class_for, #complex_content, #complex_contents, #complex_type, #complex_types, #direct_elements, #elements, #extension, #extensions, #initialize, #linked_complex_type, #linked_simple_type, #logger, #map_children, #mappable_children, #name, #name_local, #name_referenced, #node, #node_to_object, #nodes, #object_by_name, #ordered_elements, #parent, #prepend_namespace, #ref, #referenced_element, #schema, #schema_for_namespace, #schema_namespace_prefix, #sequences, #simple_content, #simple_contents, #simple_types, #type, #type_name, #type_namespace

Instance Method Details

#required?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/xsd_reader/attribute.rb', line 5

def required?
  (node.attributes['use'] && node.attributes['use'].value == 'required') ? true : false
end