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.



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

#nameObject (readonly)



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

def name
  @name
end

#negateObject (readonly)



94
95
96
# File 'lib/asciidoctor/document.rb', line 94

def negate
  @negate
end

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