class Asciidoctor::PDF::ThemeData

Attributes

table[R]

Public Class Methods

new(data = nil) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 8
def initialize data = nil
  @table = (data || {}).transform_keys(&:to_sym)
end

Public Instance Methods

[](name) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 12
def [] name
  @table[name.to_sym]
end
[]=(name, value) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 16
def []= name, value
  @table[name.to_sym] = value
end
delete_field(name) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 28
def delete_field name
  @table.delete name
end
dup() click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 32
def dup
  ThemeData.new @table
end
each_pair(&block) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 20
def each_pair &block
  @table.each_pair(&block)
end
eql?(other) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 24
def eql? other
  @table.to_h.eql? other.to_h
end
method_missing(name, *args) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 36
def method_missing name, *args
  if (name_str = name.to_s).end_with? '='
    @table[name_str.chop.to_sym] = args[0]
  else
    @table[name]
  end
end
respond_to?(name, _include_all = false) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 44
def respond_to? name, _include_all = false
  @table.key? name.to_sym
end
respond_to_missing?(name, _include_all = false) click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 48
def respond_to_missing? name, _include_all = false
  @table.key? name.to_sym
end
to_h() click to toggle source
# File lib/asciidoctor/pdf/theme_data.rb, line 52
def to_h
  @table
end