Class: Diagnostics::Data::Attribute

Inherits:
Struct
  • Object
show all
Defined in:
lib/diagnostics/data/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



3
4
5
# File 'lib/diagnostics/data/attribute.rb', line 3

def name
  @name
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



3
4
5
# File 'lib/diagnostics/data/attribute.rb', line 3

def value
  @value
end

Instance Method Details

#htmlObject



9
10
11
# File 'lib/diagnostics/data/attribute.rb', line 9

def html
  "<strong>#{name}:</strong> #{value}"
end

#plainObject



5
6
7
# File 'lib/diagnostics/data/attribute.rb', line 5

def plain
  "#{name}: #{value}"
end