Class: Fontconfig::Pattern::Proxy

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/fontconfig.rb

Instance Method Summary collapse

Constructor Details

#initialize(pattern, key) ⇒ Proxy



10
11
12
13
# File 'lib/fontconfig.rb', line 10

def initialize pattern, key
  @pattern = pattern
  @key = key
end

Instance Method Details

#<<(obj) ⇒ Object



19
20
21
# File 'lib/fontconfig.rb', line 19

def <<(obj)
  @pattern.add(@key, obj, true)
end

#[](num) ⇒ Object



15
16
17
# File 'lib/fontconfig.rb', line 15

def [](num)
  @pattern.get(@key, num)
end

#delete!Object



23
24
25
# File 'lib/fontconfig.rb', line 23

def delete!
  @pattern.delete(@key)
end

#each(&blk) ⇒ Object



27
28
29
# File 'lib/fontconfig.rb', line 27

def each &blk
  @pattern.each_value @key, &blk
end