Class: Caml::Config
- Inherits:
-
Object
- Object
- Caml::Config
- Defined in:
- lib/caml/caml.rb
Overview
def self.wrap(object)
if object.nil?
[]
elsif object.respond_to?(:to_ary)
object.to_ary || [object]
else
[object]
end
end
Instance Method Summary collapse
- #directives ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
15 16 17 18 19 |
# File 'lib/caml/caml.rb', line 15 def initialize # Recursively load (prompt to init if it doesn't exist) SafeYAML::OPTIONS[:default_mode] = :safe @config = YAML.load_file(File.join(Dir.getwd, 'caml.yaml')) end |
Instance Method Details
#directives ⇒ Object
21 22 23 |
# File 'lib/caml/caml.rb', line 21 def directives @config end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/caml/caml.rb', line 25 def to_s inspect end |