Class: Asciidoctor::Document::AttributeEntry
- Inherits:
-
Object
- Object
- Asciidoctor::Document::AttributeEntry
- Defined in:
- lib/asciidoctor/document.rb
Instance Attribute Summary collapse
- #name ⇒ Object readonly
- #negate ⇒ Object readonly
- #value ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(name, value, negate = nil) ⇒ AttributeEntry
constructor
A new instance of AttributeEntry.
- #save_to(block_attributes) ⇒ Object
Constructor Details
#initialize(name, value, negate = nil) ⇒ AttributeEntry
Returns a new instance of AttributeEntry.
94 95 96 97 98 |
# File 'lib/asciidoctor/document.rb', line 94 def initialize name, value, negate = nil @name = name @value = value @negate = negate.nil? ? value.nil? : negate end |
Instance Attribute Details
#name ⇒ Object (readonly)
92 93 94 |
# File 'lib/asciidoctor/document.rb', line 92 def name @name end |
#negate ⇒ Object (readonly)
92 93 94 |
# File 'lib/asciidoctor/document.rb', line 92 def negate @negate end |
#value ⇒ Object (readonly)
92 93 94 |
# File 'lib/asciidoctor/document.rb', line 92 def value @value end |
Instance Method Details
#save_to(block_attributes) ⇒ Object
100 101 102 103 |
# File 'lib/asciidoctor/document.rb', line 100 def save_to block_attributes (block_attributes[:attribute_entries] ||= []) << self self end |