Class: Asciidoctor::Document::AttributeEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/asciidoctor/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)



92
93
94
# File 'lib/asciidoctor/document.rb', line 92

def name
  @name
end

#negateObject (readonly)



92
93
94
# File 'lib/asciidoctor/document.rb', line 92

def negate
  @negate
end

#valueObject (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