Class: Minarai::Loaders::Base
- Inherits:
-
Object
- Object
- Minarai::Loaders::Base
- Defined in:
- lib/minarai/loaders/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(path) ⇒ Base
constructor
A new instance of Base.
- #load ⇒ Object
Constructor Details
#initialize(path) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/minarai/loaders/base.rb', line 8 def initialize(path) @path = path end |
Instance Method Details
#load ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/minarai/loaders/base.rb', line 12 def load case when !existed_file? raise "Does not exist file: #{pathname}" when yml_file? load_yaml_file when erb_file? load_erb_file else raise 'inalid extname error' end end |