Method: Simplexframe::Config#initialize
- Defined in:
- lib/simplexframe/simple_config.rb
#initialize(filepath) ⇒ Config
Returns a new instance of Config.
9 10 11 12 13 |
# File 'lib/simplexframe/simple_config.rb', line 9 def initialize filepath @f ||= filepath if valid?(filepath) File.open(@f) {|handle| @hash_content = YAML.load(handle)} @content = OpenStruct.new(@hash_content) end |