Class: AwesomeXmlDsl::Attribute
- Inherits:
-
Object
- Object
- AwesomeXmlDsl::Attribute
- Defined in:
- lib/awesome_xml_dsl/attribute.rb
Instance Method Summary collapse
-
#initialize(name, value) ⇒ Attribute
constructor
A new instance of Attribute.
- #to_xml ⇒ Object
Constructor Details
#initialize(name, value) ⇒ Attribute
Returns a new instance of Attribute.
5 6 7 8 |
# File 'lib/awesome_xml_dsl/attribute.rb', line 5 def initialize(name, value) @name = name @value = value end |
Instance Method Details
#to_xml ⇒ Object
10 11 12 |
# File 'lib/awesome_xml_dsl/attribute.rb', line 10 def to_xml return "#{@name}=\"#{@value}\"" end |