Class: Peanuts::Mapping
- Inherits:
-
Object
- Object
- Peanuts::Mapping
- Defined in:
- lib/peanuts/mappings.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#xmlname ⇒ Object
readonly
Returns the value of attribute xmlname.
-
#xmlns ⇒ Object
readonly
Returns the value of attribute xmlns.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(xmlname, options) ⇒ Mapping
constructor
A new instance of Mapping.
- #node_type ⇒ Object
Constructor Details
#initialize(xmlname, options) ⇒ Mapping
Returns a new instance of Mapping.
8 9 10 |
# File 'lib/peanuts/mappings.rb', line 8 def initialize(xmlname, ) @xmlname, @xmlns, @prefix, = xmlname.to_s, .delete(:xmlns), .delete(:prefix), end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/peanuts/mappings.rb', line 6 def end |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
6 7 8 |
# File 'lib/peanuts/mappings.rb', line 6 def prefix @prefix end |
#xmlname ⇒ Object (readonly)
Returns the value of attribute xmlname.
6 7 8 |
# File 'lib/peanuts/mappings.rb', line 6 def xmlname @xmlname end |
#xmlns ⇒ Object (readonly)
Returns the value of attribute xmlns.
6 7 8 |
# File 'lib/peanuts/mappings.rb', line 6 def xmlns @xmlns end |
Class Method Details
.node_type(node_type = nil) ⇒ Object
17 18 19 20 |
# File 'lib/peanuts/mappings.rb', line 17 def node_type(node_type = nil) @node_type = node_type if node_type @node_type end |
Instance Method Details
#node_type ⇒ Object
12 13 14 |
# File 'lib/peanuts/mappings.rb', line 12 def node_type self.class.node_type end |