Class: Masterman::Loader::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/masterman/loader/base.rb

Direct Known Subclasses

Direct, Json, Yaml

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/masterman/loader/base.rb', line 8

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/masterman/loader/base.rb', line 4

def options
  @options
end

Instance Method Details

#allObject



16
17
18
19
20
21
22
# File 'lib/masterman/loader/base.rb', line 16

def all
  if options[:cache]
    @all ||= find_all
  else
    find_all
  end
end

#findObject

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/masterman/loader/base.rb', line 12

def find(*)
  raise NotImplementedError, 'not implemented yet'
end