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.
96 97 98 99 100 |
# File 'lib/asciidoctor/document.rb', line 96 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)
94 95 96 |
# File 'lib/asciidoctor/document.rb', line 94 def negate @negate end |
#value ⇒ Object (readonly)
93 94 95 |
# File 'lib/asciidoctor/document.rb', line 93 def value @value end |
Instance Method Details
#save_to(block_attributes) ⇒ Object
102 103 104 105 |
# File 'lib/asciidoctor/document.rb', line 102 def save_to block_attributes (block_attributes[:attribute_entries] ||= []) << self self end |