Class: Nexml::DummyBase
- Inherits:
- 
      Object
      
        - Object
- Nexml::DummyBase
 
- Defined in:
- lib/nexml.rb
Overview
base class for all Document objects
Direct Known Subclasses
Document, Nexml::Document::Char, Nexml::Document::Characters, Nexml::Document::Coding, Nexml::Document::Edge, Nexml::Document::Matrix, Nexml::Document::Node, Nexml::Document::Otu, Nexml::Document::Otus, Nexml::Document::State, Nexml::Document::Tree, Nexml::Document::Trees
Instance Attribute Summary collapse
- 
  
    
      #attributes  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute attributes. 
- 
  
    
      #text  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute text. 
Instance Method Summary collapse
- #attribute(a) ⇒ Object
- 
  
    
      #initialize(opts)  ⇒ DummyBase 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of DummyBase. 
Constructor Details
#initialize(opts) ⇒ DummyBase
Returns a new instance of DummyBase.
| 88 89 90 91 92 93 94 | # File 'lib/nexml.rb', line 88 def initialize(opts) @text = nil @attributes = {} @attributes = opts[:attrs] if opts[:attrs] @text = opts[:text] if opts[:text] true end | 
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
| 87 88 89 | # File 'lib/nexml.rb', line 87 def attributes @attributes end | 
#text ⇒ Object
Returns the value of attribute text.
| 87 88 89 | # File 'lib/nexml.rb', line 87 def text @text end | 
Instance Method Details
#attribute(a) ⇒ Object
| 96 97 98 | # File 'lib/nexml.rb', line 96 def attribute(a) @attributes[a] end |