Class: Coradoc::Element::Attribute

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/element/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#children_accessors, children_accessors, declare_children, #simplify_block_content, visit, #visit

Constructor Details

#initialize(key, value, _options = {}) ⇒ Attribute

Returns a new instance of Attribute.



6
7
8
9
# File 'lib/coradoc/element/attribute.rb', line 6

def initialize(key, value, _options = {})
  @key = key.to_s
  @value = build_values(value.to_s)
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



4
5
6
# File 'lib/coradoc/element/attribute.rb', line 4

def key
  @key
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/coradoc/element/attribute.rb', line 4

def value
  @value
end