Class: Factbase::Light

Inherits:
Object
  • Object
show all
Defined in:
lib/factbase/light.rb

Overview

A decorator of a Factbase, that forbids most of the operations.

Author

Yegor Bugayenko (yegor256@gmail.com)

Copyright

Copyright © 2024-2025 Yegor Bugayenko

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(fb) ⇒ Light

Returns a new instance of Light.

[View source]

14
15
16
# File 'lib/factbase/light.rb', line 14

def initialize(fb)
  @fb = fb
end

Instance Method Details

#insertObject

[View source]

22
23
24
# File 'lib/factbase/light.rb', line 22

def insert
  @fb.insert
end

#query(query, maps = nil) ⇒ Object

[View source]

30
31
32
# File 'lib/factbase/light.rb', line 30

def query(query, maps = nil)
  @fb.query(query, maps)
end

#sizeObject

[View source]

18
19
20
# File 'lib/factbase/light.rb', line 18

def size
  @fb.size
end

#to_term(query) ⇒ Object

[View source]

26
27
28
# File 'lib/factbase/light.rb', line 26

def to_term(query)
  @fb.to_term(query)
end