Class: Nexml::DummyBase

Inherits:
Object
  • Object
show all
Defined in:
lib/nexml.rb

Overview

base class for all Document objects

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject

Returns the value of attribute attributes.



87
88
89
# File 'lib/nexml.rb', line 87

def attributes
  @attributes
end

#textObject

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