Module: Moxml::ProcessingInstruction

Includes:
Node
Defined in:
lib/moxml/processing_instruction.rb

Constant Summary

Constants included from NodeBehavior

NodeBehavior::TYPES

Constants included from XmlUtils

XmlUtils::VALID_ELEMENT_NAMES

Instance Attribute Summary

Attributes included from NodeBehavior

#context, #native, #parent_node

Instance Method Summary collapse

Methods included from Node

adapter, contract_module, contract_modules, node_type_map, wrap

Methods included from NodeBehavior

#==, #adapter, #add_child, #add_next_sibling, #add_previous_sibling, #after, #ancestors, #at_xpath, #before, #blank?, #children, #clear_native_memo!, #descendants, #digest, #document, #dup, #each, #each_node, #entity_bearing?, #find, #find_all, #first_child, #following_siblings, #has_children?, #initialize, #invalidate_namespace_cache!, #last_child, #line_number, #materialize, #materialize_fields, #namespace, #namespaces, #next_sibling, #outer_xml, #parent, #path, #preceding_siblings, #previous_sibling, #prime_contract, #refresh_native!, #remove, #replace, #source_position, #text, #to_xml, #xpath

Methods included from XmlUtils

#encode_entities, #normalize_xml_value, #validate_comment_content, #validate_declaration_encoding, #validate_declaration_standalone, #validate_declaration_version, #validate_element_name, #validate_entity_reference_name, #validate_pi_target, #validate_prefix, #validate_uri

Instance Method Details

#contentObject



21
22
23
# File 'lib/moxml/processing_instruction.rb', line 21

def content
  adapter.processing_instruction_content(@native)
end

#content=(new_content) ⇒ Object



25
26
27
# File 'lib/moxml/processing_instruction.rb', line 25

def content=(new_content)
  adapter.set_processing_instruction_content(@native, new_content.to_s)
end

#identifierString

Returns the primary identifier for this processing instruction (its target)



17
18
19
# File 'lib/moxml/processing_instruction.rb', line 17

def identifier
  target
end

#targetObject



7
8
9
# File 'lib/moxml/processing_instruction.rb', line 7

def target
  adapter.processing_instruction_target(@native)
end

#target=(new_target) ⇒ Object



11
12
13
# File 'lib/moxml/processing_instruction.rb', line 11

def target=(new_target)
  adapter.set_node_name(@native, new_target.to_s)
end