Module: Crossdomain::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/crossdomain/config.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object



17
18
19
# File 'lib/crossdomain/config.rb', line 17

def method_missing(meth, *args, &blk)
  options[meth]
end

Instance Method Details

#[](key) ⇒ Object



7
8
9
# File 'lib/crossdomain/config.rb', line 7

def [](key)
  options[key]
end

#load(opts = {}) ⇒ Object



3
4
5
# File 'lib/crossdomain/config.rb', line 3

def load(opts={})
  options.update opts
end

#optionsObject



11
12
13
14
15
# File 'lib/crossdomain/config.rb', line 11

def options
  @options ||= {
    host: '0.0.0.0', port: '843', xml_path: File.join(Dir.pwd, 'crossdomain.xml')
  }
end