Mange / roadie
1
# frozen_string_literal: true
2

3 5
module Roadie
4
  # An asset provider that returns empty stylesheets for any name.
5
  #
6
  # Use it to ignore missing assets or in your tests when you need a provider
7
  # but you do not care what it contains or that it is even referenced at all.
8 5
  class NullProvider
9 5
    def find_stylesheet(name) empty_stylesheet end
10 5
    def find_stylesheet!(name) empty_stylesheet end
11

12 5
    def to_s() inspect end
13 5
    def inspect() "#<#{self.class}>" end
14

15 5
    private
16 5
    def empty_stylesheet() Stylesheet.new "(null)", "" end
17
  end
18
end

Read our documentation on viewing source code .

Loading