Module: YamlOstruct

Defined in:
lib/yaml/ostruct.rb,
lib/yaml/version.rb,
lib/yaml/yaml_ostruct_impl.rb

Overview

yaml-ostruct gem version

Defined Under Namespace

Classes: YamlOstructImpl

Constant Summary collapse

VERSION =
'0.4.2'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/yaml/ostruct.rb', line 5

def config
  @config
end

Class Method Details

.clearObject Also known as: delete_all



11
12
13
# File 'lib/yaml/ostruct.rb', line 11

def self.clear
  @config = nil
end

.configure {|@config| ... } ⇒ Object

Yields:



29
30
31
32
# File 'lib/yaml/ostruct.rb', line 29

def self.configure
  @config ||= YamlOstructImpl.new
  yield @config
end

.load(dir) ⇒ Object



24
25
26
27
# File 'lib/yaml/ostruct.rb', line 24

def self.load(dir)
  @config ||= YamlOstructImpl.new
  @config.load(dir)
end

.method_missing(method_sym, *args) ⇒ Object



19
20
21
22
# File 'lib/yaml/ostruct.rb', line 19

def self.method_missing(method_sym, *args)
  @config ||= YamlOstructImpl.new
  @config.send method_sym, *args
end

.new(args = {}) ⇒ Object



7
8
9
# File 'lib/yaml/ostruct.rb', line 7

def self.new(args = {})
  YamlOstructImpl.new args
end