Module: ShadoPuppet::Configuration
- Included in:
- ShadoPuppet
- Defined in:
- lib/shado_puppet/configuration.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.method_missing(symbol, *args) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/shado_puppet/configuration.rb', line 16 def method_missing(symbol, *args) if args.empty? .key?(symbol) ? [symbol] : super else value = args.first value.symbolize_keys! if value.is_a?(Hash) [symbol] = value end end |
.options ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/shado_puppet/configuration.rb', line 8 def @options ||= { :ssl => true, :domain => "api.moonshado.com", :message => {} } end |
.site ⇒ Object
26 27 28 |
# File 'lib/shado_puppet/configuration.rb', line 26 def site (ssl ? "https://" : "http://") + domain + "/" end |
Instance Method Details
#configure(&block) ⇒ Object
3 4 5 |
# File 'lib/shado_puppet/configuration.rb', line 3 def configure(&block) block.bind(Configuration).call end |