Class: Parsbank::Gates
- Inherits:
-
Object
show all
- Defined in:
- lib/parsbank/gates.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.logo ⇒ Object
3
4
5
|
# File 'lib/parsbank/gates.rb', line 3
def self.logo
File.read "#{__dir__}/#{self.class.name.split('::').last.downcase}/logo.svg"
end
|
Instance Method Details
#default_config(key) ⇒ Object
7
8
9
|
# File 'lib/parsbank/gates.rb', line 7
def default_config(key)
Parsbank.load_secrets_yaml[self.class.name.split('::').last.downcase][key.to_s]
end
|
#redirect_loaders(&block) ⇒ Object
11
12
13
14
|
# File 'lib/parsbank/gates.rb', line 11
def redirect_loaders(&block)
content = block_given? ? block.call : ''
ERB.new(File.read("#{__dir__}/../tmpl/_loader.html.erb")).result(binding).gsub(/\s+/, ' ').strip
end
|