Class: AwesomeXmlDsl::Attribute

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

Instance Method Summary collapse

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_xmlObject



10
11
12
# File 'lib/awesome_xml_dsl/attribute.rb', line 10

def to_xml
  return "#{@name}=\"#{@value}\""
end