Class: Toaster::ResultEntry
- Inherits:
-
Object
- Object
- Toaster::ResultEntry
- Defined in:
- lib/toaster/test/test_result.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name = nil, value = nil) ⇒ ResultEntry
constructor
A new instance of ResultEntry.
- #to_s ⇒ Object
Constructor Details
#initialize(name = nil, value = nil) ⇒ ResultEntry
Returns a new instance of ResultEntry.
14 15 16 17 |
# File 'lib/toaster/test/test_result.rb', line 14 def initialize(name=nil, value=nil) @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/toaster/test/test_result.rb', line 13 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
13 14 15 |
# File 'lib/toaster/test/test_result.rb', line 13 def value @value end |
Instance Method Details
#to_s ⇒ Object
18 19 20 21 |
# File 'lib/toaster/test/test_result.rb', line 18 def to_s result = "<entry>\n<name>#{name}</name>\n<value>#{value}</value>\n</entry>\n" return result end |